Summary:
Lot of mobile devices, as well as tablet devices use the DSI connector,
for internal screens. This is more common in ARM devices, so consider
them as internal display as well.
Test Plan: checked on the device with DSI screen, it was considered internal
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24209
Don't put method definitions in the header file of XdgShellClient class
as it makes the code visually inconsistent. InternalClient is a good
example of how the header file of a subclass of AbstractClient class
should look like.
This change also cleans up the order of things in the header file, thus
making it a bit more obvious where new things should go.
Summary:
If we get a key event for which
if (m_xkb->shouldKeyRepeat(key) &&
waylandServer()->seat()->keyRepeatDelay() != 0) fails
m_key will be unitialised and on release we have a compare against
unitialised memory.
Won't do any harm, it'll just stop a timer that isn't running, but
valgrind complains.
0 is the value QKeyEvent uses when nativeScanCode is unknown so a safe
initial values.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23748
Summary:
Rename ShellClient to XdgShellClient in order to reflect that it
represents only xdg-shell clients.
Test Plan: Compiles, tests still pass.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23589
Summary:
Drop xdg-shell v5 support since this protocol is obsolete and all popular
wayland compositors already did that.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23573
Summary: Drop waylandclienttest in favor of xdg-shell test client from KWayland.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23565
Summary:
Given that slide in/out animation duration is not initialized when slide
location is NoEdge, assert statement will be triggered in slideIn().
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23564
Summary: wl-shell is deprecated and its support was dropped in kwin.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23563
Summary: wl-shell is deprecated, and pretty much no one uses it.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23562
Summary:
This change removes all traces of wl-shell in the test suite. That's a
prerequisite for dropping wl-shell support in KWin.
Given that wl-shell and xdg-shell are not interchangeable, some tests
were removed and initialization sequence in some tests was adjusted.
The most notable change is ensuring that each plasmashell window sets
its role and initial position before committing the surface. Setting
those properties before the first surface commit is important because
our window placement code needs to know window type in order to
avoid maximizing panels, popups, etc.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23561
Summary:
So far wayland was used by internal clients to submit raster buffers
and position themselves on the screen. While we didn't have issues with
submitting raster buffers, there were some problems with positioning
task switchers. Mostly, because we had effectively two paths that may
alter geometry.
A better approach to deal with internal clients is to let our QPA use
kwin core api directly. This way we can eliminate unnecessary roundtrips
as well make geometry handling much easier and comprehensible.
The last missing piece is shadows. Both Plasma::Dialog and Breeze widget
style use platform-specific APIs to set and unset shadows. We need to
add shadows API to KWindowSystem. Even though some internal clients lack
drop-shadows at the moment, I don't consider it to be a blocker. We can
add shadows back later on.
CCBUG: 386304
Reviewers: #kwin, davidedmundson, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kwin
Tags: #kwin
Maniphest Tasks: T9600
Differential Revision: https://phabricator.kde.org/D22810
Summary: One could just use XServerGrabber class directly.
Test Plan: Compiles.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24119
Summary:
SUPPORTED_MANAGED_WINDOW_TYPES_MASK and SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK
are used only in client.cpp and unmanaged.cpp, respectively. So, it doesn't
make sense to keep these two in a header file.
Test Plan: Compiles.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24120
Summary:
Right now a few of the window placement modes suffer one or more of the following problems:
- Inconsistency between the text shown in the Window Behavior and Window Rules KCMs
- Title does not indicate what it does
- Awkward wording
- Lack of unity in grammatical mood between the different modes
This patch fixes these issues by improving the strings and standardizing on the descriptive mood:
- Smart -> Minimal Overlapping
- Maximizing -> Maximized
- Cascade -> Cascaded
- Zero-Cornered -> In Top-Left Corner
Strings are also unified between the window behavior and window rules KCMs, and docbooks are adjusted accordingly.
Test Plan:
{F7279685, size=full}
{F7279694, size=full}
Reviewers: #kwin, #vdg, ndavis, filipf, zzag, romangg
Reviewed By: #kwin, #vdg, ndavis, filipf, romangg
Subscribers: gladhorn, alexeymin, IlyaBizyaev, broulik, hein, hpereiradacosta, GB_2, alexde, davidedmundson, romangg, cfeck, filipf, zzag, ndavis, kwin, kde-doc-english
Tags: #kwin, #documentation
Differential Revision: https://phabricator.kde.org/D23415
Summary:
Because KWin is a very old project, we use three kinds of null pointer
literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
nullptr keyword.
This change converts all usages of 0 and NULL literal to nullptr. Even
though it breaks git history, we need to do it in order to have consistent
code as well to ease code reviews (it's very tempting for some people to
add unrelated changes to their patches, e.g. converting NULL to nullptr).
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson, romangg
Reviewed By: #kwin, davidedmundson, romangg
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23618
Summary:
In some environemnts it is possible that udev detection of primary GPU
fails and it picks the first available card (normally card0). But it is
not desired, and it would be required to use different card (card1).
Introduce environment variable, which when used, will make it possible
to use different card node then one selected by udev.
You can use it like KWIN_DRM_DEVICE_NODE=/dev/dri/card1 kwin_wayland
Test Plan: Tested on the device where card0 was not usable for kms, but card1
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24051
Summary:
MinimizeAll should work as follows:
> As long as there's something to minimize, do that.
> Otherwise unminimize only the windows we minimized
> on last invocation.
Quote above is from Comment 11 by Thomas Lübking of BUG: 356161.
But current code does not fulfill these duties. Try next case: run minimizeall on some windows, then click on one of windows, then run minimizeall again. All windows would be unminimized!
I have tried to make small changes to original code of main.js, but i can't because i don't understand it.
Thats why i wrote my own version. Then i changed my version to version of zzag, because his code is more simple. I have tested both versions.
BUG: 356161
Reviewers: colomar, #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: romangg, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24044
We have lots of inconsistency at the moment in CMakeLists.txt files. Most
of it is due to kwin being a very old project. This change hopefully fixes
all of it.
Summary:
Currently component names and filenames are partially sorted. This makes adding
new items and finding existing items more difficult.
Test Plan: Compiles.
Reviewers: #kwin, gladhorn
Reviewed By: #kwin, gladhorn
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24018
Summary:
So far some placement policies were handling special case when area is
a null rectangle. However, there is no good reason to do that. We can
just pass a valid area rectangle and remove pointless checkArea helper.
Doing so will make the code simpler and more comprehensible.
Reviewers: #kwin, gladhorn
Reviewed By: #kwin, gladhorn
Subscribers: gladhorn, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23923
Summary: We have to provide placement area for the screen on which the client is.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23921
Summary:
With nearest filter fractional scaling is blurry, always use linear filter
instead on Wayland.
Test Plan: Run Plasma session with patch and scale factor 1.9.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T10481
Differential Revision: https://phabricator.kde.org/D23986