Trying to reconstrain the geometry after applying rules is unnecessary
because if the geometry is forced using a rule, resizeWithChecks()
should not change it; if the window is maximized or has entered fullscreen
mode, window gravity is irrelevant. If the window is shaded, this
resizeWithChecks() is not needed.
This change simplifies AbstractClient::applyWindowRules(), which allows
to split adjustedSize() to further simplify geometry handling.
Prefer hiding/showing the panel (i.e. the window) when not a touch event
than stopping to make the inputmethod active.
This way we remain compatible with non-virtualkeyboard inputmethods.
The bounding rect of an item is in the item-local coordinate space. If
the item is moved, its bounding rect won't change, but the parent's
bounding rect, may change.
BUG: 443756
AbstractClient::constrainClientSize() forces the minimum client size of
1x1.
If AbstractClient::adjustedSize() is called before the XdgToplevelClient
is mapped, it will return 1x1 rather than 0x0 as expected, which will
confuse
QSize s = adjustedSize();
if (s != size() && s.isValid())
resizeWithChecks(s);
in AbstractClient::applyWindowRules(). Since 1x1 is different from 0x0,
the xdg-toplevel surface is going to be resized to 1x1.
BUG: 443705
Whether relative pointers are supported doesn't depend on the input
backend. This change moves the instantiation of the extension to the
WaylandServer class to make code more consistent.
With the LEDs enum being defined in kwinglobals.h, wayland_server.h
won't need to include keyboard_input.h, which is good for compilation
times and wayland_server.h will drag less stuff, e.g. QtWidgets (input.h
includes QAction)
Currently, cpp source files are included partially in effect sub-folders
and src/effects/CMakeLists.txt, which is really confusing and hard to
follow.
With this change, effect targets will be defined in their own subfolders.
This makes build files more straightforward.
Effect sub-targets are eventually merged into a monolithic
kwin4_effect_builtins target.
Another reason for modularizing builtin effects is that no two effects
can generate moc files with the same name atm even though they are in
different sub-folders. This can be potentially useful in the future, e.g.
making effects static plugins in order to decouple builtin effects from
libkwin (every effect subfolder would need a main.cpp or plugin.cpp file,
which will include the associated moc file).
The GLTexture class is forward declared and the ShowFpsEffect class has
a QScopedPointer<GLTexture> field. We either need to include the
kwinglutils.h header file or add a destructor that does nothing and
define it in the cpp file, where kwinglutils.h is included.
At the moment we'll be setting the YInverted setting, but in practice
that won't have any effect as it only changes the render matrix and
we'll end up streaming inverted textures.
This change addresses it by rendering it into another texture first to
resolve this situation and then download that new texture instead.
The English word "pack" is not really the correct word for these
actions, and does not succeed in communicating what they will do. Since
the actions simply move the active window as far as it will go in the
specified direction, the actions can be renamed to say that instead.
Also rename the action names in the code to match their new UI text for
clarity.
With lv3:ralt_alt ("Right Alt never chooses 3rd level") option set, we
get more layouts from libxkbcommon than it was configured, see:
https://github.com/xkbcommon/libxkbcommon/issues/262
It might be correct lib's behavior, still.
The extra layouts are redundant, so we strip them out from usual usage.
BUG: 440027
This change merges the two OpenGL backends into one making the current
default of GLCore the overall default. It becomes the first context to
try to create. If it fails, it will automatically fall back to the
(previous) OpenGL 2 backend.
Reasoning: the differentiation of OpenGL 2 and 3 is a very technical one
and hard to understand for users. It is not obvious which one is better
or should be used. This results in many user discussions like "Which
backend to use?"
Back when the OpenGL 3 backend was introduced the dedicated feature made
sense. It was a new code base using new driver features. Nowadays the
code base in KWin is robust and mature and so are the drivers. A driver
advertising support for OpenGL 3 will support OpenGL 3. We don't have to
plan for driver breakage in this area any more.
Also our code evolved through the context attribute builder which gives
us the possibility to more easily fall back in case we cannot create the
context. Thus the need to select the backend is not so important as it
used to be when the feature got introduced.
If a user still wants to force OpenGL2, it is still possible by setting
the appropriate environment variables like MESA_GL_VERSION_OVERRIDE.
This change brings the improvement that the backend selection is now
completely removed from the compositing KCM.
FAIL! : TestXdgShellClientRules::testSizeApply() 'surfaceConfigureRequestedSpy->wait(10)' returned FALSE. ()
Loc: [/home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.15/autotests/integration/xdgshellclient_rules_test.cpp(731)]
If CI is moderately loaded, 10ms may not be enough. I don't remember why
10ms timeout was added.
Currently, testXdgWindowReactive() is a bit flaky because the parent
window and the popup window are created together. The popup can be
configured again if its global position changes after the parent window
has been placed.
In order to stabilize the test, create the parent window, then the popup
window.
I just got a build failure because I hadn't updated KDecoration to
include 195bcf36df.
Bump the minimum version to trigger a CMake error instead of a
compilation failure. Since we expect to be using the same version of
KDecoration as KWin, this change uses ${PROJECT_VERSION} as the minimum
version.
Currently, the pointer is moved to the center of the workspace. However,
on a multi-monitor setup, the workspace center may not be the same as
the center of the output it's on. That's the case with my setup -
1920x1080, 1920x1080, 1080x1920 (the monitors are laid out in a row from
left to right).
This change improves the default placement of the pointer by actually
moving it to the center of the screen that contains the workspace center
so the pointer doesn't end up at some "random" position from the user's
point of view.
Edge geometry has width and height, so we need the correction for
approach geometry of bottom and right corners.
The other edges are fixed as well.
BUG: 442973
On X11, there are four input models. With some input models, it's okay
if the window manager calls XSetInputFocus(), with others, the wm has to
ask the client to make a XSetInputFocus() request.
If kwin wants a client to take input focus, kwin will add the client
to the should_get_focus list, which contains all the windows that
are about to get input focus. Clients are popped from the list upon
receiving FOCUS_IN events.
A client will be added to the should_get_focus list even if kwin thinks
that the client already has input focus because communication between
the wm and xorg is async, anything can happen with input focus in meanwhile.
On the other hand, the wm may sometimes focus the null window if no
window should contain the input focus. The issue is that the
should_get_focus list is not cleaned up in that case, which can lead to
Workspace::mostRecentlyActivatedClient() returning wrong client and
possibly other async related issues.
We don't have such madness on Wayland as the compositor is in charge of
handling input focus.
This change makes Workspace::focusToNull() clear the should_get_focus,
which is reasonable. We need to deactivate "in-flight" focus requests.
This also fixes the bug where fullscreen Wayland windows don't go above
docks and panels due to Workspace::mostRecentlyActivatedClient() returning
bad client.
BUG: 439405
BUG: 395919
Currently, kwin crashes at shutdown because the idle poller plugin is unloaded when exit handlers are run, after the waylandServer() is destroyed. This results in null dereferencing.
BUG: 443268