Commit graph

18539 commits

Author SHA1 Message Date
Andrey Butirsky
db202f5c26 fix: redundant keyboard layout OSD notification
there is no need to display the OSD for window we are going to switch from

DIGEST:
BUG: 426122
2020-09-29 14:20:03 +00:00
Andrey Butirsky
2bbab06fc4 fix: wrong keyboard layout OSD notification
DIGEST:
BUG: 426120
2020-09-29 14:20:03 +00:00
Andrey Butirsky
769c8959d8 fix: no OSD indication when switching keyboard layout with Application Policy
When deciding do OSD or not, we need to consider not only last saved layout,
but last actual layout also, when comparing it to current one.

DIGEST:
BUG: 425590
2020-09-29 14:20:03 +00:00
Vlad Zahorodnii
4559d30399 Place internal osd windows according to placement policies
Currently, internal on screen display windows have the bypass window
manager hint set. If that hint is set, the osds must place themselves,
but they don't do it.

As far as I know, there is no any reason why internal OSDs have that
flag set.

By removing the Qt::BypassWindowManagerHint flag, we let kwin core
know that it's okay to place internal OSD windows.

BUG: 400675
2020-09-29 14:06:41 +00:00
Vlad Zahorodnii
6546ac2cae screencast: Replace EGLFence with a glFinish()
The way EGLFence is used is equivalent to calling glFinish().

CCBUG: 425869
2020-09-29 13:57:24 +00:00
Vlad Zahorodnii
6f153552da Allow calling setFrameGeometry() while the client is being resized
Currently, if some script attempts to resize a window while it's being
interactively resized, the corresponding change won't be propagated to
the X server.

The main reason for that is that we don't want to configure the frame
window, the wrapper window, and the client window twice. However, since
Xcb::Window keeps track of the last configured geometry, we can adjust
X11Client::updateServerGeometry() so it only configures windows that
have mismatching geometry.

By doing so, the setFrameGeometry() function can be called by scripts
even when the associated X11 window is being interactively resized.

Note that this bug doesn't affect Wayland windows.

BUG: 426988
2020-09-29 13:55:41 +00:00
Vlad Zahorodnii
ddb24eaf0a Fix ghost shadows left by context menus
If the shadow is destroyed immediately before the window is destroyed,
we need to schedule a workspace repaint in order to prevent showing a
"ghost" shadow.

BUG: 425294
2020-09-29 13:53:30 +00:00
Vlad Zahorodnii
12e59f9af8 Schedule workspace repaint for destroyed clients
We need to schedule a workspace repaint in case no effect is going to
animate the window.

The workspace repaint is issued before creating a Deleted because the
latter takes the owner of the effect window, which means that after an
instance of Deleted has been created, visibleRect() returns the frame
geometry.

CCBUG: 425294
2020-09-29 13:53:30 +00:00
Bhushan Shah
6d433bdfc9 virtualkeyboard: add text-input-v3 support 2020-09-29 10:56:24 +00:00
Vlad Zahorodnii
a433fb08a3 x11: Make removal of X11 event filters safe
If an X11 event filter has been activated and it unregisters another X11
event filter, then the window manager may crash because the foreach macro
in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or
m_eventFilters and we can call the event() method for an already defunct
filter.

With this change, X11 event filters can be safely removed and installed
at any particular moment.

BUG: 423319
2020-09-29 08:26:28 +00:00
David Edmundson
260e75f6c9 Update systemd units
By marking as part of graphical-session we get a more graceful shutdown.

Also switched to explicit restart inside the unit. Originally I did this
with drop-ins, but this complicates wayland for now.
2020-09-29 06:10:20 +00:00
l10n daemon script
cd9acd2e41 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-29 06:08:11 +02:00
Carson Black
fbab964e98 Use Header color group for decoration colours 2020-09-28 16:08:52 +00:00
Carson Black
02b1e11758 Bump up minimum C++ version to C++17 2020-09-28 16:08:52 +00:00
Aleix Pol
309d6a0d5b Always include the window decoration's clipping
No need to only report opacity on the window decoration if the window
itself is opaque.
2020-09-28 15:00:36 +02:00
Vlad Zahorodnii
688dc9ac1d Adjust kwin to recent window management interface changes 2020-09-28 14:43:34 +03:00
l10n daemon script
25b93b4ccc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-27 06:07:58 +02:00
l10n daemon script
e534d5abad SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-26 05:57:20 +02:00
Aleix Pol
375691c6c2 Improve opacity detection
If the opaque area covers all the window's shape, it means that it's an
opaque window.
This is how GTK presents opacity right now, so we'll get to skip
rendering under GTK clients and other compatible ones.
Qt is still not emitting opacity.
2020-09-25 14:08:55 +00:00
Felix Yan
a58100fc72 Correct typos in xcbutils.h 2020-09-25 08:45:06 +00:00
Vlad Zahorodnii
f24f2bd509 Enable shadow protocol support for all Wayland clients
The main motivation for this change is to enable support for our
proprietary shadow protocol in LayerShellV1Client.

Previously we couldn't move code that handles shadows in WaylandClient
because WaylandClient::bufferGeometry() was a pure virtual method.
2020-09-25 10:10:10 +03:00
Vlad Zahorodnii
989e0987d7 screencast: Ensure that there is current OpenGL context when recording a window
We need an OpenGL context otherwise we may hit an assert in libepoxy.

BUG: 425869
2020-09-24 15:47:56 +03:00
Vlad Zahorodnii
80554a3e12 Expose KWIN_XWL logging category to kdebugsettings 2020-09-24 14:56:35 +03:00
David Edmundson
095cdcd374 Revert "[effects/slidingpopups] Start the animation on only windowAdded or windowClosed"
This reverts commit 9d4c8fda09.

Unlike other effects this wasn't using hide/show as a hack for not
having a created/destroyed signal but because the window is internally
hidden when it's in auto-hide mode despite being still mapped.

BUG: 426686
2020-09-24 12:09:26 +01:00
Vlad Zahorodnii
75cad57cd9 Fix invalidation of cached x stacking order in wayland only mode
Currently, if kwin/wayland runs without xwayland, the order in which
windows are painted doesn't actually reflect the true stacking order.

If the stacking order has been changed, we need to invalidate the
cached x stacking order. But it's done only when RootInfo is present.

If Xwayland doesn't run, RootInfo is not available and thus window
raising is completely broken.

With this change, the x stacking order will be invalidated every time
some window has been raised, no matter what mode kwin operates in.
2020-09-24 09:48:15 +00:00
Andreas Haratzis
6f53f62741 Fix for PlasmaSurfaceTest broken in a3b50500
TestPanelWindowsCanCover now needs to wait for the event queue to process the hover event.
2020-09-24 09:34:29 +00:00
Andreas Haratzis
1dbe3708f5 Fix for potential use-after-free introduced in a3b50500
If showOnScreenEdge is called, immediately followed by the client's destruction, it's possible that the next event queue process will call raiseClient with a destroyed client.
We avoid this by using singleShot that is lifetime-aware.
2020-09-24 09:34:29 +00:00
Vlad Zahorodnii
0c266e760b Replace remaining usages of old connect syntax with new connect syntax
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.

Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.

Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
2020-09-24 09:33:45 +00:00
Vlad Zahorodnii
70b18ae404 Port some KCMs away from deprecated KShortcutsEditor::undoChanges()
undoChanges() has been deprecated in favor of undo() in KF 5.75.
2020-09-24 07:52:44 +00:00
l10n daemon script
102332df00 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-09-24 06:27:23 +02:00
Vlad Zahorodnii
70700b868a Properly test internal window flags
Qt::Popup is a mask, so we cannot use the `&` operator to test the window
type. We need to use QFlags::testFlag() for that purpose instead.
2020-09-23 18:21:24 +03:00
Vlad Zahorodnii
bc34736534 Use better window placement heuristics for internal clients
Currently, we do some sort of window placement only for decorated
internal windows, which feels hacky.

With this change, all internal clients will go through the window
placement code, unless it's a popup or the BypassWindowManagerHint
flag is set.

If the BypassWindowManagerHint flag is set, the window must have
valid position.

CCBUG: 400675
2020-09-23 14:39:15 +00:00
Vlad Zahorodnii
960a40ef44 Use right windowDamaged() signal in ThumbnailItem 2020-09-23 16:38:25 +03:00
Vlad Zahorodnii
989699a273 Remove unused things in VirtualKeyboard 2020-09-23 13:59:36 +03:00
Vlad Zahorodnii
22cf80c466 Don't establish text input connections every time focused surface changes
Currently, whenever the focused text input surface changes, the virtual
keyboard will create a bunch of excessive connections. This is leftover
after the old design.
2020-09-23 10:55:30 +00:00
Aleix Pol
9479c0d6b4 Do not call randomly eglGetError() after eglMakeCurrent
If it failed, it will return accordingly, and then we get to call
eglGetError, only when it fails.
2020-09-23 10:05:30 +00:00
Aleix Pol
13dcb46888 Remove unnecessary allocation in GLShader::setUniform(int, const QMatrix4x4 &)
We were creating a vector just to copy it over. We can pass the original
vector just as well.
2020-09-23 10:05:29 +00:00
Aleix Pol
097caa64a5 Improve Compositor::performCompositing
Prefer QVector to QList on local variables.
Iterate with qAsConst on containers that should not change.
2020-09-23 10:05:29 +00:00
Aleix Pol
f1233a641d Clean Workspace::updateXStackingOrder()
No need to create x_stacing by iterating over stacking_order, it can be
copied. We are not performing any operations over it.
Also no need to instanciate the tree until we want to use it.
2020-09-23 10:05:29 +00:00
Bhushan Shah
0e05f4e4c2 Add versioning information to the seat_interface->textInputV2 2020-09-23 09:02:05 +00:00
Adrien Faveraux
c0f9ed3400 Adapt to changes in the text-input interface 2020-09-23 09:02:05 +00:00
Vlad Zahorodnii
90dce019ad qpa: Expose output names to QScreen
It can be useful for things such as effects.
2020-09-23 06:36:31 +00:00
Aleix Pol
870b411015 Remove unused variable 2020-09-22 19:39:42 +02:00
Aleix Pol
61e655f7f7 Centralize WindowPixmap buffer updating code
Uses a setter and clear method pattern rather than having the code
repeated.
Instead of keeping a QPointer, now we are a QObject and we get notified
about destruction intention directly, so we can clear the pointer when
necessary.
2020-09-22 13:04:35 +00:00
Aleix Pol
26950a65a6 Have Toplevel::damage emit a QRegion
Instead of looping through the rects in the region, emit the region at
bulk. It reduces the amount of emissions we do and allows us to pack the
response accordingly.
2020-09-22 14:45:08 +02:00
Bhushan Shah
fd917b4e00 Update version number for 5.20.80
GIT_SILENT
2020-09-21 16:37:41 +05:30
Vlad Zahorodnii
5f7d23fd07 effects/flipswitch: Port away from deprecated QTimeline curve shape prop
QTimeline::CurveShape has been deprecated in Qt 5.15.
2020-09-21 06:16:33 +00:00
Vlad Zahorodnii
99dd5d94c5 effects/cubeslide: Port away from deprecated QTimeline curve shape prop
QTimeline::CurveShape has been deprecated in Qt 5.15.
2020-09-21 06:16:33 +00:00
Vlad Zahorodnii
3d0042e05b effects/desktopgrid: Port away from deprecated QTimeline curve shape prop
QTimeline::CurveShape has been deprecated in Qt 5.15.
2020-09-21 06:16:33 +00:00
Bhushan Shah
426e7f910d virtualkeyboard: slightly restructure the code
Instead of putting code in lambda put them in actual slots, this is
right now not useful but when e.g. TextInputV3 is implemented, this way
we can re-use them.

This also simplifies the code little bit and makes it easier to use with
gdb if needed.
2020-09-21 05:37:52 +00:00