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
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:
Switch to Q_ASSERT in order to make code a bit more consistent. We have
places where both assert and Q_ASSERT are used next to each other. Also,
distributions like Ubuntu don't strip away assert(), let's hope that
things are a bit different with Q_ASSERT.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: romangg, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23605
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.
The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.
Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.
A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!
The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.
The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, apol, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22371
Summary:
We need to return the absolute path instead of base name so decoColorToCombo
can return the correct index.
Test Plan:
* Go to System Settings > Window Management > Window Rules;
* Create a new rule for Konsole to force the Oxygen color scheme,
close the dialog, and click the Apply button;
* Open the rules dialog (you don't have to modify anything), click OK button, then Apply button.
Without this patch, Breeze color scheme will be forced after the
last step.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: graesslin, broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17655
Summary:
The dialog invoked through user actions menu takes the internal uuid as
command line argument which allows to query the required information
from KWin instead of using X11.
This allows to enable the system for Wayland windows.
In order to replace the usage of ClientMachine in the rules dialog the
dbus interface is extended by a value whether the window is on the
localhost. This is exposed through a virtual method on toplevel which is
overridden in ShellClient and there always returning true.
Test Plan: Run a nested Wayland and opened the dialog on a wayland window
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17750
Summary:
There's nothing relevant in kdeglobals and loading it can lead to noise
when deleting groups that override a system default.
We still cascade which will allow kiosk keys to work as well as relevant
system defaults.
Import/Export is unchanged as that already uses SimpleConfig which
includes this flag.
I don't know if it will fix the relevant issue in the bug or just
reduce noise.
CCBUG: 402139
Test Plan: Compiled.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D17645
Avoids triggering an assert and communicates that the timeout is running.
Ideally, there was a countdown label of some sort but this is better than crashing.
BUG: 399644
FIXED-IN: 5.12.8
Differential Revision: https://phabricator.kde.org/D16124
This reverts commit 8a2a00a4ca.
It was likely wrongly pushed before the KWayland changes, so it won't
compile.
Feel free to reinstate it once the dependent changes (KWayland) are in.
CCMAIL: bundito@gmail.com
CCMAIL: kwin@kde.org
Summary:
Adding "SkipSwitcher" to the API, following discussion in
BUG 375921
Depends on / related to D11925 and D11924
Reviewers: hein, #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: davidedmundson, #plasma, ngraham, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11926
Summary:
This allows to override the desktop file name.
CCBUG: 351055
Test Plan: Created a window rule for telegram-desktop to fix the icon
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11266
Summary:
The detect functionality is still extremely bound to X11 and results in
a crash when clicked. Thus it's better to disable it completely in 5.12
on Wayland.
Test Plan: Button disabled on Wayland, enabled on X11
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10642
Summary:
This call is added for the window rules kcm which has a detect
functionality. As that detect functionality cannot query any Wayland
windows we need to have some functionality in KWin core. Furthermore
this allows to simplify the code in the kcm as all the custom X11
interaction can be removed. KWin internally has the functionality to
find a window at a given position.
From a security perspective adding this dbus method is fine as the user
stays in control of the functionality. It requires active click to
select a window.
The new dbus call is already used in the rules kcm replacing the
X11 based detect functionality. That a detect is now able to get
information for both X11 and Wayland windows. So far only X11 windows
on X11 were supported. So this fills an important gap in the Wayland
offerings. It should now be possible to create rules for Wayland
windows (though may not be fully functional).
Test Plan: Run the kwin_rules_dialog and it detected the window correctly
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10490
Summary:
The window rule detection is too bound to X11 for it to work for
Wayland windows. In fact it results in the config module just crashing.
Thus it's better to just disable the items in the menu. As it's only for
X11 windows we can also enforce platform xcb for the rules dialog.
Test Plan: Menu disabled on Wayland window, menu enabled on Xwayland window
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10594
Summary:
And finally nothing inside libkwineffects, libkwinglutils,
libkwinxrenderutils and kwineffect and kwin core uses KWin::display.
We are finally XLib free!
This change drops KWin::display and removes the include to QX11Info from
kwinglobals.h. And the libraries no longer need to link X11Extras. Due
to that removal a few seeming unrelated changes are required to add the
include where needed and linkage to X11Extras.
The biggest change is to x11 platform plugin which still needs the
display and caches it in the Platform and passes it to various places in
a way that the code doesn't need to be adjusted.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3337
Summary:
Window tabs which are required for autogroup are currently not supported
in KWin. Thus exposing autogroup related window rules does not make any
sense.
This change hides the options again in the hope that we can bring the
feature back in future.
BUG: 370301
FIXED-IN: 5.8.2
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2996
Summary:
The activities combobox content is loaded asynchronously,
we are storing the configured value for the window rule
until the activity list is loaded into the combo box.
And then, we set that item as the current one in the combo.
Reviewers: #kwin, mart
Reviewed By: mart
Subscribers: luebking, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2851
At the same time the xinput2 integration is split out of X11Cursor
and made a standalone part of the platform plugin. XInput integration
is nowadays not only used by the cursor position polling, but also
for modifier only shortcuts.
By splitting it out the modifier shortcuts start to work also when
one doesn't have anything requesting a mouse position polling.
This also simplifies the conditional builds: xinput integration is
only included if we have support for it at compile time without having
to have many ifdefs in the cursor implementation. For the inclusion of
cursor in the kcmkwin this also removes all the ifdefs.
The key events are only requested if we have xinput 2.1. Otherwise we
would not get all raw events if the input device gets grabbed.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2473
By default the InputRedirectionCursor is created and only the X11
standalone platform creates the X11 specific cursor.
This is a preparation step for moving the X11 specific cursor
implementation into the x11standalone platform plugin.
The dialog only had a "Close" button but the text was only transfered in accepted()
Also fix the position of the QDialogButtonBox which is swapped and so the buttons appear at the top.
BUG: 360521
FIXED-IN: 5.6.1
Differential Revision: https://phabricator.kde.org/D1173