Commit Graph

301 Commits (e463905f04f8136145ab46e679b7560749ef29ae)

Author SHA1 Message Date
Martin Gräßlin 857219546f Update x11Time when a global shortcut is pressed
KGlobalAccel sets the timestamp as a property and we need to set our
x11Time to it otherwise following keyboard grabs might fail.

Requires 61e2a156678eef033b2629f7c72530dc78d7c3ac in kglobalaccel.
2015-02-25 08:15:53 +01:00
Thomas Lübking fdcb0e6180 correctly test whether client is on a VD
when considering if for a directional
focus switch

BUG: 331512
REVIEW: 122292
FIXED-IN: 5.3
2015-02-05 21:37:34 +01:00
Martin Gräßlin 87caab24ca Drop support for XFree86-VidModeExtension
Was only used as fallback for older NVIDIA drivers. At the same time
also drop the call to nvidia-settings which was also only used as
a fallback for refresh rate detection.

REVIEW: 122423
2015-02-04 14:45:53 +01:00
Daniel Pastushchak 0d997b1093 Introduce categorized logging for kwin core
Done by Daniel Pastushchak for KDE during GCI-2014.
2014-12-05 14:27:15 +01:00
Martin Gräßlin 4c9744fe8e Drop dependency on kdecoration.h 2014-12-02 13:50:26 +01:00
Martin Gräßlin 3d9a035312 Move MaximizeMode from KDecorationDefines to utils.h
Unfortunately it cannot be a enum defined in Client as client.h
depends on rules.h and with it in Client rules.h would depend on
client.h.
2014-12-02 13:49:08 +01:00
Martin Gräßlin d4bf3602ce Move WindowOperation enum to Options
With this Options no longer needs to inherit from KDecorationDefines.
2014-12-02 10:41:47 +01:00
Martin Gräßlin c2e53b9a2f Merge branch 'kdecorations2'
Conflicts:
	effects.cpp
	paintredirector.cpp
2014-12-02 08:38:10 +01:00
Martin Gräßlin b7a8bb4f52 Drop build option KWIN_BUILD_SCREENEDGES
The build option got introduced for Plasma Active back in a time
when we did not properly aim for convergence. In a Plasma 5 world
we want to have only one shell and one window manager which adjust
itself. This means we don't want a differently compiled kwin for
plasma active, but the same one. Thus the build option doesn't
make much sense any more. A KWin for touch interface needs to support
screenedges for the case that mouse is plugged in.

CCBUG: 340960
REVIEW: 121200
2014-11-24 10:48:49 +01:00
Martin Gräßlin 482f89b91f Fix build without KF5Activities
BUG: 340961
FIXED-IN: 5.2.0
REVIEW: 121202
2014-11-24 10:47:08 +01:00
Martin Gräßlin e32da9d9e0 Merge branch 'master' into kdecorations2
Conflicts:
	CMakeLists.txt
	paintredirector.cpp
	scene_opengl.h
	scene_qpainter.h
	scene_xrender.h
2014-10-20 16:04:52 +02:00
Montel Laurent e4b2f14141 Remove excutable attribute 2014-10-07 19:42:28 +02:00
Jeremy Whiting f8defc4c8f Context menu: Add "Keep Above Others" icon opposite of "Keep Below Others"
REVIEW:120465
2014-10-06 08:22:37 -06:00
Martin Gräßlin 9fae34f86f Remove Client::getWMHints in favor of functionality in NETWinInfo
We are only using the UrgencyHint, InputHint and GroupLeader from
WMHints. Those are provided by NETWinInfo, so we can use the
functionality provided by NETWinInfo instead of calling XGetWMHints.

REVIEW: 120162
2014-09-15 16:29:47 +02:00
Martin Gräßlin 0030eb7f84 Initial import of support for new KDecoration2 based decorations
NOTE: this is not working completely yet, lots of code is still ifdefed
other parts are still broken.

The main difference for the new decoration API is that it is neither
QWidget nor QWindow based. It's just a QObject which processes input
events and has a paint method to render the decoration. This means all
the workarounds for the QWidget interception are removed. Also the paint
redirector is removed. Instead each compositor has now its own renderer
which can be optimized for the specific case. E.g. the OpenGL compositor
renders to a scratch image which gets copied into the combined texture,
the XRender compositor copies into the XPixmaps.

Input events are also changed. The events are composed into QMouseEvents
and passed through the decoration, which might accept them. If they are
not accpted we assume that it's a press on the decoration area allowing
us to resize/move the window. Input events are not completely working
yet, e.g. wheel events are not yet processed and double click on deco
is not yet working.

Overall KDecoration2 is way more stateful and KWin core needs more
adjustments for it. E.g. borders are allowed to be disabled at any time.
2014-07-25 14:02:26 +02:00
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