Commit Graph

882 Commits (7c2448227a747ae0d45a2aedd95b83e907256fd8)

Author SHA1 Message Date
Martin Gräßlin ba66fd9ef6 [kwin] NETWinInfo2 becomes NETWinInfo
And takes a xcb_connection_t instead of Display. Also our own class
is adjusted to no longer need the connection being passed in.
2013-11-18 13:56:28 +01:00
Martin Gräßlin 2c9e21a983 [kwin] Use XCB Atom enum definition instead of XLib's one 2013-11-18 13:48:31 +01:00
Martin Gräßlin 695697ebbd [decorations] Allow Client to use QWindow based decorations
Shared implementation using the delegating methods in KDecoration
which uses either QWindow or QWidget where possible.
2013-11-14 09:41:51 +01:00
Martin Gräßlin 8ecb69cd8c [decorations] Add a KDecoration::window() returning the QWindow
KWin core can access the QWindow of the decoration instead of the
QWidget. This is a preparation step to allow QWidget based window
decorations without any QWidgets at all.

KWin core makes already use of this new accessor to get the window Id
which is also on QWidgets provided through the QWindow.
2013-11-14 09:41:50 +01:00
Martin Gräßlin 1deea69170 [paintredirector] Pass KDecoration to PaintRedirector
Gives us more power in the future.
2013-11-14 09:41:50 +01:00
Martin Gräßlin c32ec9b32b [kwin] Work around broken xcb_sync_create_alarm
The xcb sync protocol is incorrectly defined (see [1]) which results in
xcb_sync_create_alarm not creating a valid alarm. To work around this
issue we only create the alarm without setting the int64 values. For
those we use the XLib XSyncChangeAlarm call after we verified that the
alarm got created. This unfortunately reintroduces linking against
libxext. But at least resizing works again.

[1] http://lists.freedesktop.org/archives/xcb/2013-June/008375.html
2013-11-11 11:36:26 +01:00
Bhushan Shah 935851a2b5 kDebug -> qDebug in kwin 2013-11-01 17:00:41 +05:30
Thomas Lübking 3594550b14 Merge branch 'KDE/4.11'
Conflicts:
	kwin/eglonxbackend.cpp
	kwin/glxbackend.cpp
2013-09-25 23:21:36 +02:00
Thomas Lübking 06b482f725 pack to client, not deco
this makes packing following the snapping behavior

REVIEW: 112807
2013-09-25 23:09:08 +02:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Thomas Lübking 66ffd9f0f6 input window: ensure input shaping is supported
BUG: 320459
FIXED-IN: 4.11.2
REVIEW: 112623
2013-09-24 00:50:54 +02:00
Martin Gräßlin e553d2869d Move the decoration window back to the padding position after each resize
Behavior seems to have changed in Qt 5. Without doing the move the deco
has a wrong position and all mouse interaction is broken after the first
resize.

And with this change Oxygen windeco in compositing is fully functional!
2013-09-13 13:56:09 +02:00
Martin Gräßlin 7aadeaa310 Add maximized property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.

The property is of type bool and maps to isMaximized and not to
maximizeMode.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 22e4476777 Add icon property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 63bb36e2ad Add shade property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin fd64a29f72 Add desktop property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.

Also isOnAllDesktop property is added using the same changed
signal as desktop property.
2013-09-12 09:27:39 +02:00
Martin Gräßlin 29bce13e9f Add caption property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot
2013-09-12 09:27:39 +02:00
Martin Gräßlin e1c4512ccc Add active property and changed signal to KDecoration
Replaces the pure virtual method which the Decoration had to
implement. Instead the Decoration can now connect to the signal.

For KCommonDecoration there is no change at all except that the
invoked method is turned into a slot.
2013-09-12 09:27:39 +02:00
Martin Gräßlin d10a31750e Drop reset method from K(Common)Decoration
For the only remaining update flag a dedicated signal is added to
KDecoration.
2013-09-12 09:27:38 +02:00
Martin Gräßlin a90072d753 Merge KDecorationUnstable into KDecoration
Also KCommonDecorationUnstable is merged into KCommonDecoration.
2013-09-12 09:27:38 +02:00
Martin Gräßlin 75fe5f6965 Port Client::firstInTabBox to XCB
That code needs testing with Plasma Active.
2013-09-11 08:39:17 +02:00
Martin Gräßlin e687c91402 Add a changeProperty method to Xcb::Window
Used from Client to directly change properties on its client.
2013-09-10 15:30:11 +02:00
Martin Gräßlin 4173de1164 Port remaining set input focus to XCB 2013-09-10 15:30:11 +02:00
Martin Gräßlin e3a1cc0b5d Add deleteProperty() method to Xcb::Window
Calls xcb_delete_property on the managed window with the passed in
xcb_atom_t.
2013-09-10 15:30:10 +02:00
Martin Gräßlin 49da9a8fdb Add a reparent() method to Xcb::Window
Reparents the managed window to the passed in parent window.
2013-09-10 15:30:10 +02:00
Martin Gräßlin 070921f114 Add a kill() method to Xcb::Window 2013-09-10 15:30:10 +02:00
Martin Gräßlin 484c61a81e Use Window wrapper methods for manipulating the frame
And by that it's also mostly ported to XCB.
2013-09-10 15:30:10 +02:00
Martin Gräßlin cfd93246b3 Toplevel::frameId() becomes virtual
The frameId only makes sense for a Client, in case of Unmanaged the
same window id is used as for the window() handle. Client creates the
frame and destroys it.

Given that it makes sense to let Client manage the frame properly.
The ::frameId() is therefore virtual and as base implementation it
returns the client id. Client reimplements it and returns the proper
frame id.

Method is also implemented in Deleted as it used to be passed to
deleted.
2013-09-10 15:30:10 +02:00
Martin Gräßlin 4e5a44e23c XMapWindow(wrapperId()) -> m_wrapper.map() 2013-09-10 15:30:10 +02:00
Martin Gräßlin ba7c5936fe Use Client::m_client instead of Toplevel::window() where useful
Allows to use .setGeometry() instead of XMoveResizeWindow.
2013-09-10 15:30:10 +02:00
Martin Gräßlin 0d9ab27798 Use the wrapper methods for Client::m_client instead of xcb_foo 2013-09-10 15:30:10 +02:00
Martin Gräßlin c1483f41d4 Use Xcb::Window wrapper class for Client::m_client
Now we can use the wrapper for the client which we manage.
2013-09-10 15:30:10 +02:00
Thomas Lübking f1346494f6 connect iconChanged to decoration
broke with 9eaee286c55717d26535d3dc9e543c0285740d9a

BUG: 324355
FIXED-IN: 4.11.2
REVIEW: 112435
2013-09-08 23:43:19 +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
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