Commit Graph

286 Commits (2c78ff8bfde4cba168f1271bd334c98e5e3a8962)

Author SHA1 Message Date
Thomas Lübking 00bb767291 fix dangeling allActivitiesGroup pointer crash
CCBUG: 334152

Forward port of d3fe2391f6b36398ac671fe3cadef667919cc0e5 from kde-workspace
2014-06-04 16:30:29 +02:00
Thomas Lübking 5d8ae96a56 take fullscreen windows out of tabbing
it's not been possible to attach tabs to an (undecorated!)
fullscreen window.
now it's neither possible to attach a fullscreen window to
another tabgroup and fullscreening a window will untab it

CCBUG: 332568

Forward port of abf3d200cfc39fcc27a22224512853a96d947add from kde-workspace
2014-06-04 16:30:29 +02:00
Thomas Lübking d8c9da0cc7 "fix" activity assignemt by popup menu
problem is that toggleOnActivity interprets "all" as "none" and
subsequent setting of any activity will move the window to that
activity *only* - what's not suggested by the GUI
-> force the user to "hold it correctly" by unchecking all
   individual activities when setting on all - this also matches
   the display when the popup is opened w/ "on all" preselected

CCBUG: 330838

Forward port of 31f9e4cf053f59b7013ff006c86290f86adfcdb5 from kde-workspace
2014-06-04 16:30:29 +02:00
Ivan Čukić b995c9da23 KWin activities usage ported to the new library paradigm
Since the KActivities library now keeps an internal cache (and is
non-blocking), there is no point in thread-based information
fetching.

BUG: 335396
REVIEW: 118443
2014-06-01 18:58:36 +02:00
Martin Gräßlin 25155e0092 [useractions] Print debug message if launching kcmshell5 fails
If one cannot launch kcmshell5 some runtime components are missing. Thus
using kdialog (like in TabBox) or a notification would probably fail,
too. So at least print a debug warning to stdout.

BUG: 334860
REVIEW: 118161
2014-05-19 09:12:55 +02:00
Martin Gräßlin d0fb6b22ba [kwin] Use new connect syntax in useractions.cpp
Although there are many local slots in UserActionsMenu those are not
turned into lambdas as they are rather long.

REVIEW: 117117
2014-03-27 18:11:19 +01:00
Martin Gräßlin 9075b5e2d6 [kwin] Remove cursorPos() from utils.h
Only delegated to Cursor::pos() anyway, so let's just use that directly.
Fixes the annoyances of having to mock it in the unit tests which include
utils.cpp.

REVIEW: 116900
2014-03-25 15:25:40 +01:00
Martin Gräßlin 970e8765f0 [kwin] Remove support for _NET_WM_TAKE_ACTIVITY protocol
As can be seen in [1] the patches to KWin were in CVS HEAD before the
protocol got standardized and it never got any adoption. It's neither in
the NETWM spec, nor implemented in Qt4 nor in Qt5. KWin did not even add
the protocol to the NET::Supported property.

Thus it doesn't make much sense to keep a protocol which nobody speaks.

Still the code around the protocol is kept and also the names are kept.
Only difference is that Client::takeActivity got removed and the code
moved to the only calling place in Workspace. Motivated by that change
the enum defined in utils.h is moved into Workspace, it's turned into
a proper QFlags class and used as a type in the method argument instead
of a generic long.

[1] https://mail.gnome.org/archives/wm-spec-list/2004-April/msg00013.html

REVIEW: 116922
2014-03-25 15:03:21 +01:00
Martin Gräßlin d1d3401b9f Register KWin's global shortcuts with the new shortcut system
All the KWin core shortcuts get also registered inside the new global
shortcut system so that they are still triggered when running KWin on
Wayland.
2014-03-19 14:14:56 +01:00
Aleix Pol c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
Martin Gräßlin 32db9c109f [kwin] Add new kwineffects KCM to the KWin config center 2014-03-10 14:55:04 +01:00
Martin Gräßlin 4dff7888e3 [kwin] Drop build option to build without scripting
Scripting has proved it's point of being useful so it's time to turn it
into a mandatory part of KWin.

Also I start to use features provided by Scripting in more and more
parts of KWin core (e.g. sharing QQmlEngine) which makes it in the
long to complicated to have a build option and ifdefs for it.

REVIEW: 116587
2014-03-04 08:19:55 +01:00
Martin Gräßlin f48aca47a5 [kwin] Use ui-file for ShortcutDialog
At the same time switching to QKeySequenceEdit for capturing the
shortcut. This allows to get rid of xmlgui.
2014-02-27 10:18:37 +01:00
Martin Gräßlin dc9f613113 [kwin] Do not use camelcase includes for kactivities
Jenkins doesn't like them, so let's try without them.
2014-02-04 09:36:15 +01:00
Martin Gräßlin 9414d8f7f1 [kwin] Re-enable KActivities support
* KWin lists the activities in the Alt+F3 menu
* Kcmrules though looks wrong
2014-02-03 13:40:47 +01:00
Martin Gräßlin 08a09d27f8 [kwin] Remove the KActionCollection for the client keys
Not needed as we can also find the action as a child of Workspace.
2013-12-10 10:15:23 +01:00
Martin Gräßlin a6f32bf3e8 [kwin] Do not use a KActionCollection for Workspace's global shortcut actions
The ActionCollection was only used for two features:
* setting the object name
* finding the action for retrieving it's shortcut

This can also be achieved by just setting the object name and searching
for the children of the Workspace singleton.
2013-12-10 10:01:13 +01:00
Martin Gräßlin edeb8051e9 [kwin] Remove KActionCollection usage in TabBox
Only feature used by KActionCollection is setting the object name.
2013-12-10 09:34:11 +01:00
Martin Gräßlin c14f798adf [kwin] Do not use KActionCollection in VirtualDesktops
The functionality from KActionCollection is not used at all. It's
just for setting the object name. By not using the ActionCollection
to create the QAction and connecting the slot, it's also possible to
use the new compile time checked connect syntax.
2013-12-10 09:11:16 +01:00
Martin Gräßlin 1c5e5c8480 [kwin] User Actions Menu follows Client's color scheme
When the menu opens we update the QPalette to the one used by the
Client and thus providing a more common look and feel if the window
specified a custom color scheme.
2013-11-25 09:44:23 +01:00
Thomas Lübking 26febda4a0 Merge branch 'KDE/4.11'
Conflicts:
	ksmserver/screenlocker/greeter/greeterapp.cpp
	ksmserver/screenlocker/greeter/greeterapp.h
	ksmserver/screenlocker/greeter/themes/org.kde.passworddialog/contents/ui/main.qml
	kwin/libkwineffects/kwineffects.cpp
	kwin/useractions.cpp
	plasma/desktop/applets/window-list/metadata.desktop
	plasma/desktop/containments/panel/plasma-containment-panel.desktop
	plasma/desktop/toolboxes/plasma-toolbox-paneltoolbox.desktop
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
2013-11-24 15:35:17 +01:00
Thomas Lübking 54a4a4547d fix shortcut available check
and bypass idempotent shortcut setting

BUG: 327472
FIXED-IN: 4.11.4
REVIEW: 113807
2013-11-24 14:24:06 +01:00
Martin Gräßlin d5104cd4b5 [kwin] Start kcmshell5 to configure KWin 2013-11-13 11:12:27 +01:00
Bhushan Shah 935851a2b5 kDebug -> qDebug in kwin 2013-11-01 17:00:41 +05:30
Martin Gräßlin 1398f9ed04 Remove left-over from disable global shortcuts removal
There used to be an own action collection in KDE 3 times for the
block global shortcuts shortcut. But the code ws disabled and by
that I didn't see it during removing the global shortcuts blocking.
And it explains why the global shortcut blocking didn't work.
2013-09-09 09:53:39 +02:00
Martin Gräßlin 0e24f4ead4 Introduce an initShortcut method for kwinbindings
Method replaces the logic of the macros. The macros are still there
to not need to change all the code. Major difference is that the new
method uses the compile time checked connect syntax.
2013-09-09 09:41:37 +02:00
Martin Gräßlin 8d716124fa KIcon -> QIcon::fromTheme in kwin/useractions.cpp 2013-09-09 06:03:35 +02:00
Martin Gräßlin 182d094837 Drop unused includes from kwin/useractions.cpp
And again some deprecated warnings eliminated.
2013-09-09 06:03:35 +02:00
Martin Gräßlin a721898bd8 Port KWin useractions menu from KShortcut to QKeySequence 2013-09-09 06:03:35 +02:00
Martin Gräßlin f4a96da547 Client shortcuts ported to QKeySequence
Pretty straight forward, though not yet tested.
2013-09-09 06:03:35 +02:00
Martin Gräßlin 4d089b28b4 Drop menuFont from useractions menu
Recommendation is to just use the general font.
2013-09-09 06:03:35 +02:00
Martin Gräßlin 139201a2e2 KGlobal::config() -> KSharedConfig::openConfig()
KWin Core says good bye to KGlobal. We will not miss the threading
issues.
2013-09-04 16:11:40 +02:00
Martin Gräßlin 57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Reza Shah 9c2e4991cf Port kwinbindings.cpp away from KAction/KShortcut
REVIEW: 112119
2013-08-28 19:27:09 +09:00
Martin Gräßlin 37334f400a Drop no longer needed XLib includes from KWin 2013-08-20 10:29:20 +02:00
Martin Gräßlin 209666538e Port Workspace::clientShortcutUpdated away from KAction
Does no longer crash when setting a window shortcut.
2013-08-19 13:51:29 +02:00
Martin Gräßlin caae057649 Port KWin::ShortcutDialog from KDialog to QDialog 2013-08-19 12:44:30 +02:00
Martin Gräßlin c2e0c13b7b Delay performWindowOperation to next event cycle in UserActionsMenu
In case that the window operation results in destroying the window
decoration we need to have the menu closed before the deco gets
destroyed. Otherwise Qt crashes.
2013-08-19 12:15:42 +02:00
Martin Gräßlin be9b9681db Adjustments for the helper dialog on noborder/fullscreen
* Ported away from KAction
* starting the dialog is moved into a thread

Currently this code is still rather crashy as destroying the deco
seems to somehow crash KWin in the interaction.
2013-08-19 11:42:16 +02:00
Martin Gräßlin c16c0c3753 Port invert screen from XLib xrandr to xcb randr
With this we can drop the linking to xrandr in KWin core.
2013-08-01 10:26:39 +02:00
Martin Gräßlin f198126e0d KPushButton -> QPushButton 2013-07-24 09:58:41 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Thomas Lübking f2dd6d02b1 add previous screen shortcuts
REVIEW: 110521
BUG: 303083
FIXED-IN: 4.11
2013-05-22 22:25:15 +02:00
Thomas Lübking b3a12c513e add mnemonics to tabbing and "more actions"
BUG: 302833
FIXED-IN: 4.11
REVIEW: 110402
2013-05-15 22:18:29 +02:00
Martin Gräßlin c4c3eb90fb Remove outdated showWindowMenu(At) functions
Instead of wrapping for exactly one case let's just use the proper
function calls and get rid of all those methods marked as "remove KDE4"
and "backwards compatibility".

REVIEW: 110292
2013-05-04 09:58:44 +02:00
Martin Gräßlin 65ec86113a Split out Rules related code from Workspace into class RuleBook
Workspace is hardly interacting with Rules and all the Rules related code
is already in rules.cpp. This highly qualifies to move all the code out
of Workspace and improve the names.

REVIEW: 110207
2013-04-30 07:52:08 +02:00
Martin Gräßlin 89c2fd5598 Remove YesIKnowWhatImDoing from internal API
No need to have Allowed everywhere.

REVIEW: 110197
2013-04-26 12:29:42 +02:00
Martin Gräßlin 4a28d000cf Move ShortcutDialog to useractions
It's only used from useractions.cpp which means that it's not the best
fit in utils. We can see the problems with it given that it was in an
ifdef and it included quite some headers into everything.

REVIEW: 110189
2013-04-26 08:53:13 +02:00
Martin Gräßlin edb074cbc2 Split out screen handling from Workspace into own class Screens
Following the approaches of other split out functionality Screens is a
singleton class created by Workspace.

The class takes over the responsibility for:
* screenChanged signal delayed by timer
* number of screens
* geometry of given screen
* active screen
* config option for active screen follows mouse

The class contains a small abstraction layer and has a concrete subclass
wrapping around QDesktopWidget, but the idea is to go more low level and
interact with XRandR directly to get more detailed information.

All over KWin the usage from QDesktopWidget is ported over to the new
Screens class.

REVIEW: 109839
2013-04-15 10:25:10 +02:00
Martin Gräßlin 265b5523e2 Move decoration related methods from Workspace to DecorationPlugin
They were all just delegating to the DecorationPlugin.
2013-04-15 09:59:09 +02:00