The contents of the if branch is identical to the implementation of the
Toplevel::damageNotifyEvent() function and setReadyForPainting() will
never be called because m_syncRequest.isPending can be true only if the
window supports sync counters.
In case the compositor wants to cancel a touch sequence, we need to
ignore subsequent touch motion and touch up events until a new sequence
is initiated by the user.
Previously, it was implicitly handled by clearing the mapping table
between the touch slots and touch ids generated by kwayland-server.
At the moment, the display name might change between Xwayland restarts.
It is a problem because the session process (plasma) may have an
outdated value of the DISPLAY environment variable after a restart.
With this change, it is guaranteed that the DISPLAY and the Xauthority
file stay the same until the server is stopped explicitly.
Since QWindowSystemInterface::handleScreenRemoved would not be called in Integration::handleScreenDisabled, Qt apps would still reference disabled screens resulting in crashes.
Previously the text values were updated to the model after
`onEditingFinished()`, that is after losing focus, to prevent
erroneus updates.
This was making also the `needsSaving` signal fire only after
a focus change, which is not consistent with the behavior of
other KCMs.
Use `onTextEdit()` instead, so the model is updated as the user
types.
BUG: 431211
Currently the highlight is only for the items. KCModuleData will come in another MR.
This is more simple implementation than the one I previously made.
Some default value are hardcoded in the KCM such as Rows count (2) and the number
of virtual desktop, on revert to default, it keeps only the first one.
Since kwin runs as a normal user, it cannot create the X11 connection
socket directory because any user process can easily compromise the
security of the system by unsetting the sticky bit.
In order to guarantee the security of the system, the socket directory
must be created by root and have the sticky bit on.
This adds a command line tool which allows the user to set the window
decoration, and then that tool is used in the two knsrc files to allow
the user to switch window decoration directly from either a KNS dialog,
or from Discover.
Xwayland starts listening to -listenfd file descriptors after the WM_S0
selection is claimed. At the moment, it is claimed asynchronously by
kwin. First, we create a dummy window and change one of its properties
to get the timestamp. After the timestamp has been received, we actually
call xcb_set_selection_owner().
This provides kwin greater control over how X11 sockets are created for
Xwayland. For example, it can be used to ensure that the DISPLAY remains
the same across Xwayland server restarts or launching Xwayland on
demand.
Even though -listen <fd> option is deprecated, we still pass it because
older versions of Xwayland may not have the -listenfd option.
This renames updateXauthorityFile to writeXauthorityEntries as it doesn't
actually update (i.e. change) anything, it just writes new ones.
Error handling is introduced, to avoid that it continues silently without
entries, which would cause all connections to fail.
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.
This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.
We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
Occasionally, I see complaints about the file organization of kwin,
which is fair enough.
This change makes the source code more relocatable by removing relative
paths from includes.
CMAKE_CURRENT_SOURCE_DIR was added to the interface include directories
of kwin library. This means that as long as you link against kwin target,
the real location of the source code of the library doesn't matter.
With autotests, things are not as convenient as with kwin target. Some
tests use cpp files from kwin core. If we move all source code in a src/
directory, they will need to be adjusted, but mostly only in build
scripts.
Seat correctly emits dragEnded when a DataSourceInterface is destroyed,
and stops the drag.
However WlToXSource lives slightly longer to finish handling any other
visits. See the guarded delete statement in Dnd::endDrag.
With recent fixes use is mostly a hypothetical, but we still don't want
dangling pointers in our code.
XWL only clears up when a "visit" finishes.
If we end a WlToXDrag through clicking we call "WlToXDrag::end" but the
visit object stays alive, which obviously will never finish.
Both the visit and the drag object then effectively leak and are used on
the next drag.
Transfer emits "finished" mid way through it's own methods. If we delete
here transfer is left in the middle of methods like Transfer::timeout
with a dangling "this".
This allows running Xwayland apps as root. Xwayland started with an
empty Xauthority file. After kwin has received the display number, the
file is updated with an actual authority entry.
BUG: 432625
The selection owner must live as long as the X11 connection is valid;
otherwise Xwayland won't catch the corresponding selection ownership
change event, and the initialization sequence will be incomplete.
The major difference between this version and the previous is that kwin
no longer forwards the opacity to the app window if it runs as a
window window manager and a compositing manager. As Keith Packard said [1]
> The window manager support is only needed to forward the property from the
> application window to the frame; with the Composite extension, a
> compositing manager can then take that value into account when
> constructing the desktop image. Any X server can implement the Composite
> extension; the one in the X server project at freedesktop.org is just one
> such. It would be trivial to implement this extension in a direct FB
> based X server, or any other X server which places windows in off-screen
> images.
There are a couple of reasons to do so: (a) simplifies code, (b) we don't
temper with opacities on override-redirect windows.
[1] https://listman.redhat.com/archives/xdg-list/2003-December/msg00153.html