Commit Graph

646 Commits (7550d2a02064e7e524945a659b8499ed7a9dc0d6)

Author SHA1 Message Date
David Edmundson a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Scott Harvey 393af855c4 Revert "Revert "Add "SkipSwitcher" to API""
This reverts commit 5ef119044d.
2018-05-23 23:33:39 -05:00
Luca Beltrame 5ef119044d
Revert "Add "SkipSwitcher" to API"
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
2018-04-28 09:26:51 +02:00
Scott Harvey 8a2a00a4ca Add "SkipSwitcher" to API
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
2018-04-27 09:43:13 -05:00
Martin Flöser d61eaa2d66 Add a new desktopfile name rule
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
2018-03-18 09:15:15 +01:00
Martin Flöser 7a9c805b2a [kcmkwin] Re-enable detect button for window rules
Got disabled in 5.12 branch, but is functional in master.
2018-03-04 16:32:20 +01:00
Martin Flöser 88b9de04ed Merge branch 'Plasma/5.12' 2018-03-04 09:43:38 +01:00
Martin Flöser 6d6576f819 [kcmkwin/rules] Disable detect button on Wayland
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
2018-03-04 09:43:03 +01:00
Martin Flöser 1d71292e13 Add a method to dbus interface to query information about a window
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
2018-02-25 14:12:04 +01:00
Martin Flöser 7bf4a94286 Disable window rule configuration for Wayland
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
2018-02-21 18:06:47 +01:00
Alexander Potashev e033091f41 kcmkwinrules: Fix window title 2017-10-15 18:36:38 +03:00
Alexander Potashev 348ad276ac kcmkwinrules: Change file filter to "KWin Rules (*.kwinrule)" 2017-10-15 18:36:38 +03:00
l10n daemon script 5a7d6d3df9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-08-28 04:30:46 +02:00
l10n daemon script b160c5babb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-25 04:37:53 +01:00
l10n daemon script 8725f2441e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-22 05:17:38 +01:00
l10n daemon script 13d389efd1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-20 13:30:44 +01:00
l10n daemon script c855555903 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-12-13 04:11:59 +01:00
Martin Gräßlin 346619aa36 Remove KWin::display from kwinglobals
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
2016-11-16 18:00:00 +01:00
Martin Gräßlin db95b96854 [kwinrules] Hide all autogroup related widgets
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
2016-10-17 08:02:10 +02:00
l10n daemon script b2bed00c82 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-10-02 12:02:41 +00:00
Ivan Čukić 5f4a91e8d7 [kwinrules] Properly setting the value of the activity combo box
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
2016-09-24 19:17:20 +02:00
Martin Gräßlin 2a8ab547e1 Move X11Cursor into the x11standalone platform plugin
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
2016-08-19 10:57:09 +02:00
Martin Gräßlin 03700500be Create Cursor instance through Platform
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.
2016-08-19 10:57:09 +02:00
l10n daemon script 8b1a5f27df SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-06-23 21:12:32 +00:00
Kai Uwe Broulik 4f222c2cda [Rules Widget] Change decoration fallback color from "Oxygen" to "Breeze"
Reviewed-By: mgraesslin
2016-05-12 10:34:14 +02:00
Kai Uwe Broulik f9da3fb0eb [Window Rules] Fix simple shortcut not being transfered to text field
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
2016-03-21 10:28:44 +01:00
Martin Gräßlin c044ad98be Split out pointer related handling from InputRedirection
All pointer related code is moved into a new class called
PointerInputRedirection.

The main idea is to simplify the code and make it easier to maintain.
Therefore also a few changes in the setup were performed:
* before init() is called, no processing is performed
* init() is only called on Wayland and after Workspace is created
* init property is set to false once Workspace or WaylandServer is
  destroyed

Thus code can operate on the following assumptions:
* Workspace is valid
* WaylandServer is valid
* ScreenLocker integration is used

The various checks whether there is a waylandServer() and whether
there is a seat are no longer needed.

Some of the checks have been reordered to be faster in the most common
use case of using libinput. E.g. whether warping is supported is first
evaluated by the variable bound to whether we have libinput and only if
that is false the backend is checked.

The new class doesn't have signals but invokes the signals provided
by InputRedirection. I didn't want to add new signals as I consider
them as not needed. The areas in KWin needing those signals should
be ported to InputEventFilters.
2016-02-12 13:38:26 +01:00
Kevin Funk 8ea4f4dae7 Port to CMake AUTOMOC
Summary: Run convert-to-cmake-automoc.pl over all .cpp files

Differential Revision: https://phabricator.kde.org/D882
2016-02-01 21:05:36 +01:00
l10n daemon script aa0f2c88f0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-01-10 11:46:53 +00:00
l10n daemon script 02e9001f39 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-12-27 09:18:16 +00:00
Yuri Chornoivan 7a57e8c20a Fix minor typo 2015-11-18 19:07:09 +02:00
Thomas Lübking a4791e629d Add rule to protect the focus on a window
This allows to pin the focus on certain window as well
as to more easily give it away on others (typically launchers)

BUG: 185060
CCBUG: 337798
FIXED-IN: 5.5
REVIEW: 126059
2015-11-17 21:30:05 +01:00
l10n daemon script 6bb9f6db7b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-17 13:07:36 +00:00
l10n daemon script 56860e63f5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-07 21:21:42 +00:00
Nick Shaforostoff 3a8d7d866a optimize string operations
-use qstringliteral only when necessary (i.e. not in concat or comparison)
-use qbytearray instead of qstring when dealing with latin1 input and output (glplatform)
-use qstringref to extract numbers from strings (glplatform)
-define qt_use_qstringbuilder to optimize all string concatenations
-anidata: use ctor init lists, add windowType member initialization

REVIEW: 125933
2015-11-05 14:14:06 +00:00
l10n daemon script 3433b05c97 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-11-04 17:27:21 +00:00
l10n daemon script c342be5961 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-10-03 11:20:49 +00:00
Martin Gräßlin 06fc00b4a9 [wayland] Support pointer warping in the backends
The X11 backend can warp the pointer.
2015-06-06 17:43:13 +02:00
Martin Gräßlin 74c111ef88 [wayland] Add support for pointer warping in InputRedirectionCursor
With libinput we do can support warping pointers, let's do it.
2015-06-06 17:43:13 +02:00
Martin Gräßlin 8a9bbf7ca3 XCB::CURSOR becomes a required dependency
It was only optional because build.kde.org did not provide it when the
dependency got introduced.
2015-06-04 17:50:29 +02:00
Thomas Lübking f887c7d4ee Merge branch 'Plasma/5.3' 2015-06-03 21:40:08 +02:00
Thomas Lübking 6a27626090 set still required xcb properties in findRule
which is invoked "in place" of the detect button
when calling the kcm as special window/application
setting from the Alt+F3 menu

BUG: 348472
REVIEW: 123953
2015-06-03 21:22:38 +02:00
Ivan Čukić e44bffa097 Fixing activities list in the rulewidget
KActivities API is not synchronous anymore. If we want to retrieve
the activities, we should do it when we actually get the data.
We are listening to the service status changes and activity list changes.

REVIEW: 123869
BUG: 347732
2015-06-02 20:10:48 +02:00
l10n daemon script d07fd3a140 SVN_SILENT made messages (.desktop file) 2015-06-01 11:58:20 +00:00
l10n daemon script 99237c9b3f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-06-01 10:08:03 +00:00
Thomas Lübking 8855f47f34 lazy setting of xbc properties on qApp
just a wild guess - the crashes showed up
somewhen after the early setting of the property/
X11Info access - if this indeed is the cause, they
should disappear or only appear after actually using
the detect button. We'll see.

CCBUG: 346748
REVIEW: 123777
2015-05-15 23:55:28 +02:00
Thomas Lübking 87a3d01a75 lazy setting of xbc properties on qApp
just a wild guess - the crashes showed up
somewhen after the early setting of the property/
X11Info access - if this indeed is the cause, they
should disappear or only appear after actually using
the detect button. We'll see.

CCBUG: 346748
REVIEW: 123777
2015-05-15 22:02:52 +02:00
Martin Gräßlin 67d7eb7120 [kcmkwin/rules] Fix kdeinit_kwin_rules_dialog crashing on start
It needs to install the x11connection on the QApplication as it uses
kwinglobals.h internally. Same fix as already done for the KCM, see
305387ec3a.

Thanks to soee on #plasma for reporting the issue just in time to make
Riddell hold the release off.
2015-04-23 09:36:31 +02:00
Lasse Liehu c17195fb28 Fix extraction of two messages in kcmkwinrules
This adds previously untranslatable strings "Yes" and "No"
from yesnobox.h.

CCMAIL: kde-i18n-doc@kde.org
REVIEW: 123311
2015-04-09 22:47:37 +03:00
l10n daemon script 262da1b7c9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-04-07 13:20:00 +00:00