Summary:
AbstractClient gains a new pure virtual killWindow method and this gets
implemented in ShellClient.
ShellClient performs the killing by sending a term signal to the
process. This can only work if the client connected through the socket
and didn't get a socketpair fd passed. In that case the pid is KWin's
and KWin doesn't want to terminate. Thus this is special handled to
destroy the connection instead.
In case terminating the process has no effect, the connection gets
destroyed after five seconds.
The KillWindow is adjusted to operate on AbstractClient instead of
Client.
This implements T4463.
Test Plan: Killed windows and auto test
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3370
Summary:
A new virtual method is added to Platform:
startInteractiveWindowSelection
The interactive window selection enters a mode where the user can select
a window through the pointer or keyboard device. The cursor is turned
into a crosshair cursor, unless another cursor name is provided (e.g.
pirate for kill window).
Once a window is selected the provided callback method is invoked with
the selected Toplevel as argument. In case the user cancelled the
selection a nullptr argument is passed in.
Currently it's only implemented by the X11 standalone platform using the
logic from KillWindow. Just instead of killing the window the callback
is invoked.
KillWindow loses the X11 implementation and interacts with the new
functionality in Platform by providing a lambda function for the
killing.
Test Plan: Killing of X11 windows is still possible
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3363
Summary:
Removes the special handling from events.cpp for KillWindow. The same
functionality can be provided through the X11EventFilter.
This is a preparation step for moving the interactive window selection
into the Platform and to support KillWindow also for Wayland.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3362
Instead of passing the macro based Predicate to findClient it now
expects a function which can be passed to std::find_if.
Existing code like:
xcb_window_t window; // our test window
Client *c = findClient(WindowMatchPredicated(window));
becomes:
Client *c = findClient([window](const Client *c) {
return c->window() == window;
});
The advantage is that it is way more flexible and has the logic what
to check for directly with the code and not hidden in the macro
definition.
In addition there is a simplified overload for the very common case of
matching a window id against one of Client's windows. This overloaded
method takes a Predicate and the window id.
Above example becomes:
Client *c = findClient(Predicate::WindowMatch, w);
Existing code is migrated to use the simplified method taking
MatchPredicate and window id. The very few cases where a more complex
condition is tested the lambda function is used. As these are very
local tests only used in one function it's not worthwhile to add further
overloads to the findClient method in Workspace.
With this change all the Predicate macro definitions are removed from
utils.h as they are now completely unused.
REVIEW: 116916
Where possible it is changed to Cursor::pos(), where we cannot use the
Cursor class (e.g. Aurorae) we can at least try to limit the usage to
prevent roundtrips to the X server.
REVIEW: 109178
The code is rewritten in a way to replace the local event loop with event
filtering done in the normal way through events.cpp. Therefore instead of
creating a KillWindow whenever it's needed, there is one available in
Workspace which will be reused on next invocation.
The responsible events are passed from events.cpp to KillWindow for
processing.
In order to port the keycode to symbol to XCB, KWin now finds
xcb_keysyms and links it.
To get the right cursor KWin now links the XCursor library which is
unfortunatelly an XLib based library, but there seems to be no XCB
replacement.
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org
svn path=/trunk/KDE/kdebase/workspace/; revision=742302
r623744 | lunakl | 2007-01-15 13:19:44 +0100 (Mon, 15 Jan 2007) | 3 lines
Kill only with left or middle button.
svn path=/trunk/KDE/kdebase/workspace/; revision=659523
svn+ssh://coolo@svn.kde.org/home/kde/branches/work/kde4/kdebase
.
I couldn't resolve one kicker conflict that results from different
development directions, so I rely on Aaron to sort it out - the file
is commited with conflicts
svn path=/trunk/KDE/kdebase/kwin/; revision=439627
"smart" apps from doing stupid things before they get MapNotify.
This avoids the recent Java+OracleInstaller strange problem too.
The patch may look huge, but it's only adding two KWin wrappers
for X(Un)GrabServer() and uncommenting the calls in Client::manage().
svn path=/trunk/kdebase/kwin/; revision=271152