There are a few benefits to using smart pointers from the standard library:
- std::unique_ptr has move semantics. With move semantics, transfer of ownership
can be properly expressed
- std::shared_ptr is more efficient than QSharedPointer
- more developers are used to them, making contributions for newcomers easier
We're also already using a mix of both; because Qt shared pointers provide
no benefits, porting to standard smart pointers improves consistency in
the code base. Because of that, this commit ports most of the uses of QSharedPointer
to std::shared_ptr, and some uses of QScopedPointer to std::unique_ptr
The current shortcuts could conceivably override app shortcuts, since
they don't use the Meta key. The following changes are made:
Switch keyboard layout: Ctrl+Alt+K -> Meta+Alt+K
Activate window that wants attention: Ctrl+Alt+A -> Meta+Ctrl+A
Kill Window: Ctrl+Alt+Esc -> Meta+Ctrl+Esc
These are safe to change in the code rather than adding new ones and
keeping the old ones around for compatibility's sake because
KGlobalAccel::setDefaultShortcuts by default preserves old shortcuts
when they are changed, and we aren't overriding that behavior here. So
only new installs will get the new shortcuts and existing user installs
will be untouched.
Makes sure disabled outputs are reported as such, leaving behind the
assumption that all outputs are always enabled.
Ensures the corresponding outputEnabled/Disabled signals are emitted.
Updates the window title to reflect the output state.
AppletPopup window type should accept focus, behaving like other window types like
Dock. At the moment it is instead behaving like notification, which seems wrong.
This should also fix a failing unit test.
AppletPopup's are typically supposed to be attached to the panel and
should remain visible when the virtual desktop is changed. If the
AppletPopup is pinned and the virtual desktop is changed, without
this patch, the window does not remain attached to the panel. This is
how AppletPopup was supposed to work even according to the unit test
which currently fails.
The lowest latency setting wasn't applied because the internal
implementation contained an excess 'e' in comparison to the setting
exposed to the user
BUG: 453694
When a gesture is cancelled because of the distance between fingers or the
time it took to register them all, no gesture has been taken yet. In that
case, the canceling would never be ended, effectively disabling all touchscreen
gestures.
On Wayland, we create a dummy window to fix HiDPI issues. At the moment,
the QQuickRenderControl::renderWindow() returns a fixed offset 0,0.
As it turns out, QQuickItem::mapToGlobal() will poke the
QQuickRenderControl::renderWindow() function to map the specified point
to the global coordinate space.
Since the renderWindow() function returns hardcoded offset, the
mapToGlobal() function is sort of broken in fullscreen effects.
In order to fix mapToGlobal() on Wayland, this change makes the
EffectQuickRenderControl return the position of the associated
OffscreenQuickView.
When zoom factor is 1, the zoom effect will paint the scene in an
offscreen texture, but not actually paint the textures on the screen.
Zoom factor can be 1 when the effect has been just stopped.
BUG: 454407
When the effect closes, all the extra data attached to the window
(offToCornerId and apertureCorner properties) are not valid anymore
and need to be reset right after the animation end.
also manage the two edge cases where a window either appeared or
got minimized while the effect was running to either show it or not
BUG: 454280
On Wayland, screens are repainted independent of each other. If zooming
animation stops on one screen, other screens may still be stuck in the
zoomed state and therefore result in potential flickering. Issue a full
screen repaint when zooming stops to ensure that other screens are
repainted with "unscaled" contents.
BUG: 454407
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2472>
Currently, if you want to use TimeLine, you need to track the last
presentation timestamp which boils down to carrying some boilerplate
code.
The current situation can be improved by making TimeLine work with
presentation timestamps.
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2473>
The magnification filter was changed to GL_NEAREST with the reasoning
that "pixel granularity" would be more correct. Perhaps that was not a
bright idea. Change it back to GL_LINEAR.
BUG: 454408
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2471>
In response to a XCB_CONFIGURE_NOTIFY on the output window, the new size
is set as mode and the output layer buffer is recreated.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2459>
The config group is formed as "Effect-" + plugin id, i.e. "desktopgrid"
Config migration from DesktopGrid to desktopgrid is already handled by
a kconf_update script.
BUG: 454102
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2464>
Under Gnome/Unity/XFCE, but not Plasma(!), QFontconfigDatabase queries
the platform native interface for certain font settings
(e.g. antialiasingEnabled). Without a QPNI this would crash KWin
as soon as it tried to query for fonts.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2468>
This fixes integration of the zoom effect with the blur effect and qtquick
effects such as overview or window view.
The main con of the proposed solution is that offscreen rendering can be
a bit overkill. But on the other hand, it's the most robust way to
ensure that fullscreen effects integrate correctly with the zoom effect.
For example, without it, the quick scene effect would need to figure out
what screen views to paint for the given screen. There are also more
finicky cases, e.g. the screen transform effect.
BUG: 447002
BUG: 447670
BUG: 453467
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
Under kwin_wayland `kwinApp()->connection()` is for communicating with
XWayland, but in X11Windowed backend we need to talk to the host XServer.
Restore `XRenderUtils::init` and set it accordingly based on
whether we're running standalone or windowed, so that `kwin_wayland`
works running nested in an X session again.
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>