Commit graph

1401 commits

Author SHA1 Message Date
Xaver Hugl
9337f145d5 move InputMethod singleton to Application 2022-07-21 15:16:40 +02:00
Vlad Zahorodnii
4bfb0acc17 Make Workspace track managed outputs
This change adjusts the window management abstractions in kwin for the
drm backend providing more than just "desktop" outputs.

Besides that, it has other potential benefits - for example, the
Workspace could start managing allocation of the placeholder output by
itself, thus leading to some simplifications in the drm backend. Another
is that it lets us move wayland code from the drm backend.
2022-07-21 08:43:50 +00:00
Vlad Zahorodnii
c7af7adda6 x11: Hard-code 0 default screen
The screen number matters only on multi-head setups.
2022-07-20 11:37:57 +00:00
Vlad Zahorodnii
5a8beacd2b Drop Platform::findOutput()
Please, don't use integer ids to identify outputs!
2022-07-18 13:52:58 +00:00
Vlad Zahorodnii
885e9acb6e Drop ApplicationWaylandAbstract
We gain nothing with it. XCB setup logic in the Xwayland server has to
be moved to the workspace layer anyway. For example, this move of
responsibilities will be needed to support running more than just one
instance of Xwayland. Architecture-wise, it would be cleaner too.

Unfortunately, it breaks encapsulation of the Application, but this can
be taken care later.
2022-07-15 12:18:03 +00:00
Vlad Zahorodnii
b167f67362 autotests: Use less QRectF::toRect() 2022-07-15 07:56:07 +00:00
David Edmundson
7292af3d04 Use floating geometry throughout
With fractional scaling integer based logical geometry may not match
device pixels. Once we have a floating point base we can fix that. This
also is
important for our X11 scale override, with a scale of 2 we could
get logical sizes with halves.

We already have all input being floating point, this doubles down on it
for all remaining geometry.

- Outputs remain integer to ensure that any screen on the right remains
aligned.
 - Placement also remains integer based for now.
- Repainting is untouched as we always expand outwards
 			   (QRectF::toAdjustedRect().
 - Decoration is untouched for now
 - Rules are integer in the config, but floating in the adjusting/API
This should also be fine.

At some point we'll add a method to snap to the device pixel
grid. Effectively `round(value * dpr)  / dpr` though right now things
mostly work.

This also gets rid of a lot of hacks for QRect right and bottom which
are very
confusing.

Parts to watch out in the port are:
 QRectF::contains now includes edges
QRectF::right and bottom are now sane so previous hacks have to be
removed
 QRectF(QPoint, QPoint) behaves differently for the same reason
 QRectF::center too

In test results some adjusted values which are the result of
QRect.center because using QRectF's center should behave the same to the
user.
2022-07-14 10:04:46 +01:00
Vlad Zahorodnii
e09ca74295 wayland: Make workspace responsible for creating Screens
The Screens object is created by Workspace on X11. This change makes X11
and Wayland behave more similar. As is, the Screens is a helper for
window management code, don't use it in backends. Note that the X11 backend
already uses the Screens, it needs to be addressed individually.
2022-07-13 17:54:35 +00:00
Arjen Hiemstra
8284740cdf InputMethodTest: Only create the windowAddedSpy when actually needed
We don't really care about the window showing up until we're calling
showInputPanel, but since Workspace::windowAdded is triggered for any
window that gets added, the test sometimes fails because count() is 2
instead of 1. To avoid that, only create the spy when it's actually
relevant instead of all the way at the start before any other setup is
done.
2022-07-13 15:24:19 +00:00
Arjen Hiemstra
78c8ebc345 Make MoveResizeWindowTest::testResizeForVirtualKeyboard data-driven
This allows us to easily expand the things the test tests for and allows
testing some corner cases more properly.
2022-07-12 22:43:56 +01:00
Arjen Hiemstra
083437d487 Don't use QRect::bottom when applying virtual keyboard geometry
Bottom is unreliable because of "historical reasons" in Qt. So don't use
bottom, instead calculate the proper height and top manually.
2022-07-12 22:43:56 +01:00
David Edmundson
36f7bae36a Revert "inputpanel: Compensate the 1px difference in height for panel position"
This reverts commit 8d588f165c.
2022-07-12 22:31:38 +01:00
Rodney Dawes
8d588f165c inputpanel: Compensate the 1px difference in height for panel position
It seems there is a 1px offset in the availableArea height, so compensate
by subtracting an extra pixel from the input panel height, to avoid a gap
below the panel.

Fixes https://invent.kde.org/teams/plasma-mobile/issues/-/issues/150
2022-07-12 14:34:10 -04:00
Vlad Zahorodnii
79e0051b04 autotests: Port more tests from obsolete Screens 2022-07-12 07:05:45 +00:00
Vlad Zahorodnii
fa78de6219 kwineffects: Strip ScreenPaintData of transforms
ScreenPaintData provides a way to transform the painted screen, e.g.
scale or translate. From API point of view, it's great. It allows
fullscreen effects to transform the workspace in various ways.

On the other hand, such effects end up fighting the default scene
painting algorithm. For example, just have a look at the slide effect!
With fullscreen effects, it's better to leave to them the decision how
the screen should be painted. For example, such approach is taken in
some wayland compositors, e.g. wayfire, and our qtquick effects already
operate in similar fashion.

Given that, strip the ScreenPaintData of all available transforms. The
main motivation behind this change is to improve encapsulation of item
painting code and simplify model-view-projection code in kwin. It will
also make the job of extracting item code for sharing purposes easier.
2022-07-06 11:10:54 +00:00
Vlad Zahorodnii
a6d72d3f60 wayland: Introduce IdleDetector
The IdleDetector is an idle detection helper. Its purpose is to reduce
code duplication in our private KIdleTime plugin and the idle wayland
protocol, and make user activity simulation less error prone.
2022-06-29 20:27:50 +03:00
Laurent Montel
c83568dfdd GIT_SILENT: remove extra ';' 2022-06-23 13:43:09 +02:00
Xaver Hugl
a38a44cb2a libinput: use std::unique_ptr for events 2022-06-21 17:50:49 +00:00
Rachel Mant
fd18401dbf Introduced a new setting for the task switcher - OrderMinimizedMode - and implemented the tabbox logic for it 2022-06-14 07:57:01 +00:00
David Edmundson
419c0b81fd Support an alternative harcoded scale for X
Anything in xcb_ structs are always in X local, all member variables
aside from buffers are in kwin local space.

This patch ignores a few paths that are not relevant on wayland.
2022-06-07 11:58:26 +01:00
Luca Carlon
da0dd1e367 Support new AppletPopup window type
See the discussion in https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/500.

BUG: 411462
BUG: 332512
FIXED-IN: 5.25
2022-05-27 21:49:37 +00:00
Xaver Hugl
615cd352fb add autotest for touchscreen gestures 2022-05-27 17:49:59 +00:00
Vlad Zahorodnii
f3b291bce0 Make TimeLine API ergonomic with presentation timestamps
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>
2022-05-26 17:10:07 +00:00
Vlad Zahorodnii
572a0904d8 autotests: Register ElectricBorder type
QSignalSpy yells about it.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2460>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2460>
2022-05-25 08:40:24 +00:00
David Edmundson
c36ecacf1c Wait for lockscreen to actually be started before running lock tests
Firstly we weren't waiting for a signal at all, we are relying on events
being processed externally which is wrong.

Secondly ScreenLocker::KSldApp::self()->lockState() is tri-state;
unlocked, acquiring, locked. This gets compressed to a boolean where
acquiring and locked are the same.

If we run the tests whilst we're still acquiring the lock screen we can
call unlocked before we've finished locking. The greeter might then be
shown afterwards triggering a re-lock. It's a confused state.
2022-05-19 19:26:28 +00:00
Kai Uwe Broulik
a2c91f9434 backends/x11: Cleanup KWinXRenderUtils and move it to eglx11common
The XRender backend has been removed, leaving most of KWinXRenderUtils unused.

The few features that are still used, notable `XRenderPicture` and pict format
are moved into the x11/common directory.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-19 12:10:18 +00:00
Vlad Zahorodnii
3b46067fc1 autotests: Force OpenGL compositing in testPointerInput
Window View effect requires OpenGL compositing.
2022-05-19 11:28:47 +00:00
Vlad Zahorodnii
4c05db3c30 Simplify Workspace::addWaylandWindow()
I believe this is a relic from the past when we used not to destroy
the ShellClient when the associated surface is unmapped.
2022-05-17 16:38:47 +00:00
Xaver Hugl
0b27ce4d34 Make touchscreen gestures realtime 2022-05-11 15:08:43 +00:00
Vlad Zahorodnii
63a866d98c Make WindowItem handle opacity
This change makes the WindowItem track the opacity and schedule a
repaint. It further decouples the legacy scene from code window
abstractions.

It's an API breaking change. WindowPaintData no longer can make windows
more opaque. It only provides additional opacity factor.
2022-05-11 09:42:35 +00:00
Vlad Zahorodnii
1d699a703d autotests: presentwindows -> windowview 2022-05-09 10:56:35 +00:00
Vlad Zahorodnii
def99b1a7c Update WindowItem's visibility
With this, the WindowItem will know whether it's actually visible. As
the result, if a native wayland window has been minimized, kwin won't
try to schedule a new frame if just a frame callback has been committed.

EffectWindow::enablePainting() and EffectWindow::disablePainting() act
as a stone in the shoe. They have the final say whether the given window
is visible and they are invoked too late in the rendering process.
WindowItem needs to know whether the window is visible in advance,
before compositing starts.

This change replaces EffectWindow::enablePainting() and
EffectWindow::disablePainting() with EffectWindow::refVisible() and
EffectWindow::unrefVisible(). If an effect calls the refVisible()
function, the window will be kept visible regardless of its state. It
should be called when a window is minimized or closed, etc. If an effect
doesn't want to paint a window, it should not call effects->paintWindow().

EffectWindow::refVisible() doesn't replace EffectWindow::refWindow() but
supplements it. refVisible() only ensures that a window will be kept
visible while refWindow() ensures that the window won't be destroyed
until the effect is done with it.
2022-05-05 12:21:26 +00:00
Marco Martin
4cb3ab09ed Realtime screen edges gestures for scripted effects
Possibility to implement realtime screenedges gestures in scripted effects,
implement it in the windowsaperture show desktop effect.
* Expose registerRealtimeScreenEdge to JavaScript, the callback will be
a JS function.
* Add the concept of freezeInTime() in the animation js bindings,
it will either create an animation frozen at a given time or freeze a running animation
that can be restored and ran to completition at any time
* add an edges property only for showdesktop as it's not directly on the effect configuration
2022-05-03 13:43:38 +00:00
Vlad Zahorodnii
2fdb55b199 Rename InternalWindow::internalWindow() to InternalWindow::handle()
internalWindow->handle() reads better than internalWindow->internalWindow()
2022-04-29 17:47:41 +03:00
Vlad Zahorodnii
5ee044e6fc Some client/toplevel -> window 2022-04-29 17:47:39 +03:00
Vlad Zahorodnii
066ac3200a backends/libinput: Rework Device getter
libinput_device_get_user_data() can be used to get the associated Device
object with libinput_device. That way, we won't need to maintain a
private list of all input devices.
2022-04-29 12:47:34 +00:00
Vlad Zahorodnii
22e5c8a260 autotests: client -> window 2022-04-27 12:45:46 +00:00
Vlad Zahorodnii
c519f2d126 autotests: Port KWinFrameworkIntegration from source vars to target based apis 2022-04-25 13:12:21 +00:00
Vlad Zahorodnii
175037d9d1 Prefer the term "window" over "client" in Workspace 2022-04-25 11:33:55 +00:00
Vlad Zahorodnii
4b91c6163f Rename XdgShellClient to XdgShellWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
a21aa839b1 Rename X11Client to X11Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
3cdee2f24a Rename LayerShellV1Client to LayerShellV1Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
fb4607f5a6 Rename InternalClient to InternalWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Nils Fenner
b491aeb9ae Rename AbstractClient to Window 2022-04-22 17:39:12 +00:00
Vlad Zahorodnii
6b4daeddc9 src/xwl -> src/xwayland
It makes naming more consistent, we use "wayland" more frequently than
"wl".
2022-04-22 13:09:51 +03:00
Vlad Zahorodnii
b64f95b703 Integrate kwaylandserver
This makes KWin switch to in-tree copy of KWaylandServer codebase.

KWaylandServer namespace has been left as is. It will be addressed later
by renaming classes in order to fit in the KWin namespace.
2022-04-22 12:27:33 +03:00
Xaver Hugl
f6eee463ba Make lcms2 a hard dependency
When we do more color management stuff we'll need it in more places,
making it a hard requirement reduces the amount of needed ifdefs and
should make adding color management features a little simpler.
2022-04-20 12:21:38 +02:00
Nils Fenner
aaa429ee0a Merge Toplevel into AbstractClient
References issue #81
2022-04-18 07:42:11 +00:00
Ismael Asensio
75d71a1c1a AbstractClient: Re-check screen rules on screen enabled
BUG: 409979
FIXED-IN: 5.25
2022-04-16 16:02:12 +00:00
Vlad Zahorodnii
8e7a8c5a11 Rename AbstractOutput to Output
AbstractOutput is not so Abstract and it's common to avoid the word
"Abstract" in class names as it doesn't contribute any new information.
It also significantly reduces the line width in some places.
2022-04-15 17:49:49 +03:00
Vlad Zahorodnii
09782bcf11 autotests: Use more fully qualified KWayland::Client types
This is needed to make "Output" identifier less ambiguous.
2022-04-15 17:49:49 +03:00
Vlad Zahorodnii
b376865f52 Rename WaylandOutputConfig to OutputConfiguration 2022-04-15 14:49:02 +00:00
Vlad Zahorodnii
d43dac8f8d Merge AbstractWaylandOutput with AbstractOutput 2022-04-15 14:49:02 +00:00
Eric Edlund
26a4f75944 Implement desktopSwitching() interface for realtime animations
Added this interface to the VirtualDesktopManager. Realtime touchpad gestures update the interface to allow for mac os style desktop switching.
Also makes gestured switching use natural direction.

BUG: 185710
2022-04-15 00:09:52 +00:00
Vlad Zahorodnii
3534b6afee Remove input processing functions in Platform
Input event flow has been refactored so all input events originate from
input devices.

The X11 backend uses InputRedirection so make it forward events to
relevant input device handlers.
2022-04-14 17:29:51 +03:00
Vlad Zahorodnii
4790408423 Run clang-format again
Some people either don't have clang-format installed or disable the
commit hook.
2022-04-14 13:58:03 +03:00
Vlad Zahorodnii
2ac1f9b7d3 kwineffects: Expose internalId 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
efd43f97e6 Drop Scene::qpainterRenderBuffer() 2022-04-13 10:16:16 +00:00
Ismael Asensio
5fdf271c32 tests/rules: Port from X11 virtual desktop indexes
Improve and adapt the autotests to the use the new Wayland `desktops`
API instead of relaying on the X11 fallback methods.
2022-04-11 16:24:50 +00:00
Ismael Asensio
cb55532135 test/rules: Ensure we destroy the test window on cleanup
This avoids crashing when a test fails
2022-04-11 14:21:57 +00:00
Ismael Asensio
cb877595b2 tests/rules: Rename member variables 2022-04-11 12:11:34 +02:00
Ismael Asensio
32b529a694 tests/rules: Reduce code duplication
Reduce the code duplication and boilerplate to create and destroy
the test clients by making the related variables class members.

Handle special cases using an extensible flag mechanism.
2022-04-11 12:11:34 +02:00
Volker Krause
972534eb3c Adapt to changes in the Qt6 QPA API
As a pleasant surprise this turned out much easier than anticipated,
all the API is still there, just moved to Qt::GuiPrivate.
2022-04-08 14:19:56 +00:00
Vlad Zahorodnii
601ef328df Drop more legacy Workspace.clientArea() overloads
With this change, the Workspace would provide clientArea() overloads
that take only AbstractOutput and VirtualDesktop. integer ids are
obsolete as they are unstable.
2022-03-29 17:34:41 +00:00
Vlad Zahorodnii
e293972eaa Run clang-tidy with -checks=readability-braces-around-statements fixit
This fixes style issues in old code.
2022-03-28 10:54:11 +00:00
Xaver Hugl
8914a6c50e add global touchscreen gestures
Swipe with three fingers
- left to switch to the previous virtual desktop
- right to switch to the next virtual desktop
- up and down to toggle the overview

CCBUG: 439925
2022-03-27 19:09:04 +02:00
Vlad Zahorodnii
7096e3ead8 Run clang-format
The .clang-format file is based on the one in ECM except the following
style options:

 - AlwaysBreakBeforeMultilineStrings
 - BinPackArguments
 - BinPackParameters
 - ColumnLimit
 - BreakBeforeBraces
 - KeepEmptyLinesAtTheStartOfBlocks
2022-03-25 13:25:15 +02:00
Volker Krause
2a171e5fa8 Adapt build system to also support building against Qt6 2022-03-25 08:26:49 +00:00
Eric Edlund
1f8a65c434 Rename DEFAULT_MINIMUM_SCALE_DELTA in GestureRecognizer
This constant is now DEFAULT_UNIT_SCALE_DELTA.
This makes more sense now that we're using realtime gestures.
2022-03-23 09:49:35 +00:00
David Edmundson
2a6746a921 XWayland:split connection and process spawning
These are two conceptually different tasks that were intertwined.
On it's own it doesn't accomplish anything but is an important refactor
for longer term goals, namely:

- moving xwayland into kwin_wayland_wrapper with our wayland restart
handling support
- having multiple X connections

Behaviour should be the same.
2022-03-22 16:25:12 +00:00
Vlad Zahorodnii
563e372440 autotests: Fix DBusInterfaceTest with KWIN_BUILD_ACTIVITIES=OFF
X11-specific code path was overlooked in
79a4733dc5.
2022-03-22 13:28:18 +02:00
Vlad Zahorodnii
3c945358fc Revert "Implement desktopSwitching() interface for realtime animations"
This reverts commit c7c1ac78ea.

This change was merged prematurely.
2022-03-19 18:30:41 +02:00
Vlad Zahorodnii
91632bd030 Revert "Refactor DEFAULT_MINIMUM_SCALE_DELTA in GestureRecognizer"
This reverts commit a508a8c6db.

It didn't go through code review process.
2022-03-19 18:29:39 +02:00
Eric Edlund
a508a8c6db Refactor DEFAULT_MINIMUM_SCALE_DELTA in GestureRecognizer
This constant is not DEFAULT_UNIT_SCALE_DELTA.
This makes more sense now that we're using realtime gestures.
2022-03-19 10:06:01 -04:00
Eric Edlund
c7c1ac78ea Implement desktopSwitching() interface for realtime animations
Added this interface to the VirtualDesktopManager. Realtime touchpad gestures update the interface to allow for mac os style desktop switching.
2022-03-19 13:19:54 +00:00
Julius Zint
39160e7dbd Remove no_xdg_runtime_dir_test
[6/6] Make autotests create fake input devices

This test was the only one where input() could return a nullptr. With
this test removed, autotests can now expect input() to always return a
sane valid value and are therefor simpler to write.

That test belongs in kwayland-server anyway and kwayland-server's test
suite already tests that starting without XDG_RUNTIME_DIR is a no-no
thing
2022-03-17 08:35:40 +00:00
Julius Zint
270a963350 Migrate all autotest input simulation functions
[5/6] Make autotests create fake input devices

Migrate all input simulation functions from kwinApp()->platform()->...
to the their counter part in the Test namespace.
2022-03-17 08:35:40 +00:00
Julius Zint
93305f6041 Add all required input simulation methods
[4/6] Make autotests create fake input devices

This translates all required input simulating methods from
kwinApp()->platform()->... to seperate functions in the Test namespace.
2022-03-17 08:35:40 +00:00
Julius Zint
33487c06d6 Add all three VirtualInputDevices for autotests
[3/6] Make autotests create fake input devices

This commit adds back all three VirtualInputDevices for simulating
keyboard, touch and pointer input events from autotests.
2022-03-17 08:35:40 +00:00
Julius Zint
3134198a30 Move VirtualInputDevice to autotests
[1/6] Make autotests create fake input devices

The goal of this patch set is simulating user input in unit tests via
InputDevices and no longer use the Platform to fake input. This matches
more closely with how input is processed when running a full plasma
wayland session, i.e. with the DRM and libinput backends.
2022-03-17 08:35:40 +00:00
Vlad Zahorodnii
79a4733dc5 autotests: Fix TestDbusInterface with KWIN_BUILD_ACTIVITIES=OFF 2022-03-16 12:36:18 +00:00
Volker Krause
57e0119d23 Adapt to Qt6's removal of Qt::X11Extras 2022-03-16 06:45:42 +00:00
Eric Edlund
5cf8db26ec Changes to GestureRecognizer and gestures 2022-03-15 13:29:05 +00:00
Volker Krause
eee16b01a4 Port away from deprecated QWheelEvent position methods
Those are gone in Qt6 (unlike similarly named methods for other
event types).
2022-03-13 12:23:22 +00:00
Volker Krause
51250cfb4a Use | rather than + for combining QFlags
The plus operator is no longer available for flags in Qt6.
2022-03-13 10:00:54 +00:00
Aleix Pol
e043f2262f inputmethod: Fix the test
We should account for keyboards that are not full screen (unlike
maliit). It shouldn't make a difference for maliit.
2022-03-09 13:24:26 +00:00
Kai Uwe Broulik
a55ea639a1 autotests: Guard tabbox_test by KWIN_BUILD_TABBOX
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-03-03 14:34:10 +00:00
Vlad Zahorodnii
0f448a83d9 autotests: Test moving pointer between windows 2022-03-03 13:45:47 +00:00
Alex Richardson
d789ecc6d1 Use #cmakedefine01 for all KWIN_BUILD_* macros
This ensures that we get a warning if the config header is not included
instead of compiling the code as if it was disabled. Interestingly, some
checks already used #if KWIN_BUILD_*, so those were generating -Wundef
warnings when the feature is disabled. Commit 886173cab assumed that all
those features were already 01, so this unbreaks the build if any of the
features is disabled.

Fixes: 886173cab ("Reduce ifdefs in Workspace::supportInformation()")
2022-02-28 18:59:04 +00:00
Kai Uwe Broulik
d54723cbf2 Add KWIN_BUILD_SCREENLOCKER option
Allows to build KWin without lockscreen support and thus drops the
kscreenlocker dependency.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-02-23 14:39:25 +01:00
Vlad Zahorodnii
153d5965f8 wayland: Remove unpolish() calls
It's leftover after the times when widget style was using wayland
connection. Breeze had to destroy all wayland resources before
terminating the internal connection.
2022-02-22 07:36:47 +00:00
Vlad Zahorodnii
0213661a7c wayland: Rework Xcursor theme loading
Xcursor loading code has hardcoded search paths, in order to take into
account distros installing app data in a different location,
libwayland-cursor sets the ICONDIR to the icon directory computed based
on the install prefix.

However, that won't work with gitlab CI because it relocates binaries. A
more robust way to find cursors would be to use QStandardPaths to find
all the icon directories on the system.

Another advantage of using own cursor loading code is that it allows us
to reuse cursor images that are symlinks. For example, with
breeze_cursors, almost half of the files in the cursors directory are
symlinks.

The main disadvantage of this approach is that we would have to keep the
search paths up to date. However, on the hand, there are not that many
of them, e.g. ~/.icons, ~/.local/share/icons, /usr/share/icons,
/usr/local/share/icons. The last three are implicitly handled by the
QStandardPaths.
2022-02-18 09:59:39 +00:00
Vlad Zahorodnii
158f1db513 autotests: Drop TestXdgShellClient::testWindowOpensLargerThanScreen()
With the xdg_toplevel.configure_bounds support, the compositor is
finally able to tell the client the maximum recommended window size.

That approach allows us to keep the compositor side simple and it
prevents (as long as the app is well behaved) annoying visual glitches
such as mapping window with one size and then quickly resizing it to
the final size.
2022-02-16 08:23:55 +00:00
Ismael Asensio
f055efc941 tests/xdgshellclient_rules: Add tests for screen rules
There are two operations failing currently, so we QEXPECT_FAIL
them for now:
- A new client is not moved to the screen set by the rule
   (Wayland only). Affects Apply, Force and Remember
- Disabling and enabling an output will not move the client
   to the Forced screen (On X11 and Wayland, BUG:409979)
2022-02-14 17:15:19 +00:00
Michail Vourlakos
bc145b614c support kdecoration2 blurregion
--use kdecoration2 blurred regions to adjust blur effect appropriately when
needed

CCBUG:395725

Requires: https://invent.kde.org/plasma/kdecoration/-/merge_requests/17
2022-02-09 21:00:07 +00:00
Vlad Zahorodnii
6a0430eaa0 Fix builtin effects not loading
The api of kcoreaddons_target_static_plugins() has changed so static
plugins must be linked with kwin_x11 and kwin_wayland directly.
2022-02-06 01:29:41 +02:00
Vlad Zahorodnii
77f712d3a7 Fix tracking of geometry restore with electric maximize
If the user wants to move a tiled window, but changes their mind and
tiles the window back to the previous position, the geometryRestore()
will be corrupted because initialMoveResizeGeometry() is the same as the
geometry of the window in the tiled mode.

This change fixes tracking of the geometry restore by precomputing the
geometry restore when starting interactive move. That way, if the window
is untiled and tiled again without release left pointer button, the
geometry restore will be set to the correct value in setQuickTileMode().

This change also adjusts the test suite so such a subtle case won't be
broken again without noticing it.
2022-02-03 16:01:45 +00:00
Vlad Zahorodnii
fde0e243d9 wayland: Let user set "no border" property in more cases
It can also be applied to client-side decorations. As long as the
compositor can ask the client to use some specific decoration mode, the
"no border" property can be set.
2022-01-31 15:55:25 +00:00
Vlad Zahorodnii
6432f29e9f autotests: Remove unused screenedge.h include 2022-01-25 21:16:51 +02:00
Vlad Zahorodnii
5ee8389705 autotests: Remove unused screens.h includes 2022-01-25 21:13:30 +02:00