Commit Graph

849 Commits (1c8233ad6dc55a2de55eed1db3412171ddd5d2eb)

Author SHA1 Message Date
Martin Gräßlin 57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Martin Gräßlin d973194c36 Use an XCB replacement for XSelectInput
Wrapped in xcbutils.

In addition the check whether another WM is running in main.cpp is
improved by doing a checked request and directly checking for the
error. If there is an error, KWin puts out an error message and
quits.
2013-08-19 10:52:22 +02:00
Anselmo L. S. Melo c2942c4e73 Porting clients to Qt5/KF5: QStandardPaths
REVIEW: 111972
2013-08-13 17:54:39 -03:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
Martin Gräßlin 330003cdee Replacement for XEvent queue inspection in FocusOut event case
Instead of inspecting the XEvent queue we create a Timer with a
singleshot of 0 msec to move the setActive(false) call to the end of the
event handling. In case there is a matching FocusIn event this will be
handled before the timer fired and can cancel the timer.
2013-08-05 09:48:14 +02:00
Martin Gräßlin 94e4a31370 Port from XLib XSync to xcb sync 2013-07-31 14:05:24 +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
Martin Gräßlin 65321cf4e5 Drop qtBefore483() helper method
No longer needed with Qt 5.
2013-07-24 09:47:03 +02:00
Thomas Lübking 9694330aa8 grant minimizability to transient special clients
This will not provide a 100% fix, since at least KMainWindow
toolbars at some point start to behave like override_redirects

BUG: 320921
REVIEW: 111303
FIXED-IN: 4.11
2013-07-01 21:19:53 +02:00
Thomas Lübking 70d81ce426 drop inputFocus on internalKeep
unmapping would do the same, but does not take
place to keep the window alive for the compositor
this breaks re-activation which takes place on
inputFocus events which won't occur since the
window got deactivated, but never lost the focus

BUG: 317484
FIXED-IN: 4.11
REVIEW: 111046
2013-06-26 12:42:09 +02:00
Martin Gräßlin 3f69bb0e7f Change Client's clormap to xcb_colormap_t
At same time also renaming variable to follow naming scheme and have a
sensible name. Also moved default value initialization into initializer
list.

REVIEW: 110283
2013-05-28 11:55:39 +02:00
Martin Gräßlin 41b37afa96 Use xcb_timestamp_t for ping window functionality
At same time rename the variable to follow m_camelCase naming scheme and
initialise the variable with default value in ctor.
2013-05-28 11:55:39 +02:00
Martin Gräßlin b39965ec27 Client's userTime related code ported over to XCB
At same time variable user_time renamed to m_userTime to follow naming
scheme.
2013-05-28 11:55:39 +02:00
Martin Gräßlin dc1496f731 Client::killProcess takes xcb_timestamp_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin edefd5f3d2 Port Client::sendClientMessage to XCB 2013-05-28 11:55:39 +02:00
Martin Gräßlin 7cf461b154 Client::readIcons accepts xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin 5dae0cb010 Change Client::window_group to xcb_window_t
At the same time adjust name to m_camelCase to follow naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 5afe5f810e Port Client::transient_for handling to XCB
The type of the transient_for related variables are changed to
xcb_window_t. They cannot be Xcb::Window as we don't take ownership over
the transient for window.

Variables are renamed to m_camelCase to follow naming scheme.

A wrapper for retrieving the TransientFor hint is added to the Xcb
Wrappers.
2013-05-28 11:55:38 +02:00
Martin Gräßlin aa55cf98ae Port Client's move resize grab window to XCB
Using Xcb::Window to wrap this helper window and port all the used XLib
calls to XCB.

Also renaming the variable to m_ and camel case to follow general naming
scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin b4d2129a3f Port Client::client to XCB
Unfortunately the Xcb::Window wrapper cannot be used for the client
window as the client should not be destroyed by KWin.

All the API calls except XSelectInput are changed to xcb and the name is
adjusted to m_client to follow the naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 424589ab4a Use an Xcb::Window for Client::wrapper
The Xcb::Window nicely encapsulates the created wrapper window. As
almost all code is adjusted, the variable is also renamed to
m_wrapper to follow the normal naming scheme.
2013-05-28 11:55:38 +02:00
Thomas Lübking b3d8ce9044 make minimized windows first of minimized
instead of last, causingding to  general LIFO

REVIEW: 110567
2013-05-22 22:24:35 +02:00
Aurélien Gâteau 9aea91166b Improve kwin_killer_helper dialog
Simplify dialog text, using different text for local and remote
processes.

Replace "KWin" in the dialog name with "Window Manager".

REVIEW: 110363
2013-05-16 09:39:11 +02:00
Martin Gräßlin d305185247 Remove Workspace pointer from Toplevel
Instead have a simple workspace() method returning the pointer.
2013-05-13 08:28:16 +02:00
Martin Gräßlin 9ed3307467 Port Decoration related XLib code to XCB
REVIEW: 110341
2013-05-07 16:55:09 +02:00
Martin Gräßlin 4022de7075 Use signal/slots instead of deep function calls into decoration
For all the decoration updates called from Client into the decoration we
also have a signal being emitted. So turning the pure virtual public
functions into slots means we can just connect our existing signals and
get rid off the deep function calls.

The keepAbove/Below signals are changed to take a boolean argument as
needed by KDecoration and a few emitted signals are moved to a better
fitting location.

REVIEW: 110335
2013-05-07 16:53:58 +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 6dc64841a7 Cleanup and reorder includes in client.cpp
REVIEW: 110205
2013-04-29 08:42:44 +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 6d0d9cfe43 Remove KWin::Notifications
Overall all notifications except compositing suspended by DBus were
configured by default to not have any action. This means all the time we
emit a notification we keep DBus and KDED busy for nothing.

All the cases when a notification is triggered ire also exported to
KWin scripting, so if one really needs to handle something in case a
window is moved, it could be done through a KWin script with much more
context about the event.

REVIEW: 110113
BUG: 258097
FIXED-IN: 4.11
2013-04-23 16:23:55 +02:00
Martin Gräßlin 5b56cff520 Remove demands attention notification 2013-04-23 16:21:30 +02:00
Martin Gräßlin c9bfecc12b Remove dialog close notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 5db4923598 Remove (not) on all desktops notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 2a2632ee76 Remove Window Unminimize Notification
Fun fact: it was configured to play the Unmaximize sound.
2013-04-23 16:21:29 +02:00
Martin Gräßlin d6c4fc4f86 Remove Window Minimized Notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 6c0a35d0e0 Remove Shade Up/Down Notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 88c77db4b8 Remove window close notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 5d303e0fee Remove delete window notification 2013-04-23 16:21:29 +02:00
Martin Gräßlin 15546e11c2 Rename DecorationPlugin::noDecoration property to disabled 2013-04-15 09:59:09 +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
Martin Gräßlin bac6edb269 Add Activities::nullUuid() to replace define in client.cpp
REVIEW: 109853
2013-04-11 13:01:53 +02:00
Martin Gräßlin da85b5fdc7 Split out Activities related code from Workspace
All activities related code moves into new singleton class Activities.
This class gets only included into the build if the build option is
enabled which means there are less ifdefs all over the code and it also
handles better the moc doesn't like ifdef case.

The class holds the list of open and all activites, the current and the
previous activity and the KActivities::Controller. It also emits the
signals for any activities related changes.

Workspace still contains some activities related code. That is the
adjustment on change of current activity. Nevertheless the code looks
much cleaner now and does not contain the confusing naming conflict with
takeActivity() which existed before.

In all the places where Activities got used the code got adjusted and
quite often the ifdef got added with a fallback for the disabled case.
2013-04-11 13:01:36 +02:00
Martin Gräßlin 34d0df3e0a Remove Workspace::updateOnAllActivitiesOfTransients
Method is more or less just a clone of the Virtual Desktop variant and
not needed as toggleClientOnActivity already takes care of transients.
2013-04-11 13:01:36 +02:00
Martin Gräßlin 6d6b013720 Introduce a proper screen property in Toplevel
Instead of calculating the screen number each time screen() is invoked,
the screen number gets stored in a private member variable and evaluated
whenever either the screen count changes or the Toplevel's geometry
changes. During move/resize the screen property doesn't get updated. The
update is delayed till the end of the move/resize operation.

REVIEW: 109715
2013-04-02 08:21:01 +02:00
Martin Gräßlin 556d71933b Merge branch 'KDE/4.10' 2013-04-02 08:18:40 +02:00
Martin Gräßlin d12f5de4c0 Adding an activitiesChanged signal to Toplevel
Only emitted from Client.

REVIEW: 109706
BUG: 317366
FIXED-IN: 4.10.3
2013-04-02 08:17:30 +02:00
Thomas Lübking 16998db274 Merge branch 'KDE/4.10'
Conflicts:
	kwin/useractions.cpp
2013-03-24 22:29:50 +01:00
Thomas Lübking 6fb5353cab remove moveResizeMaximized option
REVIEW: 103948
BUG: 91703
BUG: 299245
FIXED-IN: 4.11

- The setting is ignored, the decoration always gets a "true" for it
- moving a maximized window requires breaking a "strong" snap (1/16 of screen height - unless you use quick maximization)
- all snapping is done towards the client, not the frame
- QuickTileMode is exported to the decoration (just as the maximizeMode) so that it can fix the bordersize alongside that.
2013-03-24 22:26:48 +01:00
Thomas Lübking f6bad91b17 use QWidgetAction for activity setting in alt+f3
not that i really like using QWidgetAction, but it'll
prevent the popup from autoclosing.
Introduce activityUpdateBlocking to prevent users from
removing the popup under their fingertips

BUG: 283309
FIXED-IN: 4.10.2
REVIEW: 107762
2013-03-24 21:57:26 +01:00
Martin Gräßlin 7e3809a3ca Split out Application Menu related code into own class
Following the approach to move out of Workspace what doesn't belong into
Workspace Appmenu support goes into an own class.

This also has the advantage of better compilation with Qt 5 as moc seems
to dislike ifdefs in the slot definitions.

REVIEW: 109497
2013-03-21 09:34:56 +01:00