Commit Graph

12842 Commits (2c169e4bca46289536eb96ed105e63d0b5714772)

Author SHA1 Message Date
Martin Gräßlin 2c169e4bca [egl/wayland] Bind Wayland Display to EGL display 2015-03-17 10:11:13 +01:00
Martin Gräßlin a0b2a938aa [wayland] Support creating Texture from Wayland shm buffer
EglWaylandBackend gains support for creating textures from a
BufferInterface. At the same time it loses the possibility to use
the Xcb shm extension to load the texture. That is Xwayland is
required.

In order to support it in a better way the WindowPixmap is passed
to the Texture for loading and updating. Which is then passed to the
backend specific implementation.
2015-03-17 10:08:27 +01:00
Martin Gräßlin 19d90e4e0e [scene] Add basic support for Wayland Buffer in WindowPixmap
The concept of Buffers do not match WindowPixmap perfectly. With X11
we had a pixmap as long as the size was the sime, then it got discarded.
With Wayland we get a new Buffer whenever the window gets damaged.
Furthermore the Buffer might get destroyed any time (especially if the
client disconnects) or the data becomes invalid (it's a shm section after
all).

This adds some constraints on how the Buffer can be used. It's suggested
that the implementing sub-classes do a deep copy of the Buffer's data
when accessing it. For OpenGL that's rather obvious, for QPainter it
needs a dedicated QImage::copy.

WindowPixmap holds a pointer to the currently used Buffer, but doesn't
guarantee that it stays valid. Every time the window gets damaged, the
pointer needs to be updated.

The QPainter based scene is the first to implement support for Buffers:
on creation a deep copy is performed, on damage the changed parts are
painted into the deep copy.
2015-03-17 10:08:27 +01:00
Martin Gräßlin 07c972b6d4 [wayland] Add a SurfaceInterface to Toplevel
Adds the SurfaceInterface identified by the surface id we get from
Xwayland. This allows in an easier way to map a Toplevel to a
Wayland surface and will also be useful for Wayland clients.
2015-03-17 10:08:27 +01:00
Martin Gräßlin e463905f04 Add Workspace::findToplevel
Like findClient and findUnmanaged, just a little bit more generic.
Toplevel::findInList got adjusted to support it.
2015-03-17 10:08:27 +01:00
Martin Gräßlin 7843bbdbfb [xwayland] Drop options to start Xephyr or Xvfb
Only --xwayland stays supported. The option --displayfd and --rootless
are always set. Simplifies the feature matrix and the other X servers
don't make any sense now that we can start a proper rootless Xwayland.
2015-03-17 10:08:27 +01:00
Martin Gräßlin 47bdce074e Let the fun begin: start a WaylandServer in kwin_wayland
The WaylandServer is at the moment only used to support starting an
Xwayland. It does not support Wayland clients yet, so don't get
excited.

For Xwayland it's using the trick of creating the Display before the
QApplication is created with manual event dispatching.
2015-03-17 10:08:27 +01:00
Martin Gräßlin f651007ebe [xwayland] Don't update xrandr in WaylandScreens
Xwayland is able to update randr information based on the Wayland
Outputs, so it's not needed to do so from KWin.
2015-03-17 10:08:27 +01:00
Martin Gräßlin 76b4d8f2d5 [xwayland] Claim selection WM_S0
Xwayland expects the window manager to claim WM_S0, no matter which
display number is really used.
2015-03-17 10:03:05 +01:00
Martin Gräßlin 2cd25257d9 [wayland] Add safety check for WaylandCursorTheme::get
It's possible that loadTheme fails in which case m_theme is null
and would crash the wayland cursor library.
2015-03-17 10:03:05 +01:00
Martin Gräßlin 65007cd104 [xwayland] Add a dedicated --xwayland option to kwin_wayland
The --xwayland option starts a rootles Xwayland server. If a
rootless Xwayland server is used OperationModeXwayland is used
which is introduced with this change as well.
2015-03-17 10:03:05 +01:00
Martin Gräßlin e7019d9545 [xwayland] Add support for WL_SURFACE_ID
When XWayland associates a Wayland surface with an X window it
sends a WL_SURFACE_ID client message to the window manager.

KWin listens for this client message in Toplevel and provides it
as a member in Toplevel.

This requires KWin to actually start a Wayland server (and XWayland)
to make proper use of the information.
2015-03-17 10:03:04 +01:00
Martin Gräßlin 8c15da99ae Use property for x11AppScreen in KWin::Application
Already provided by KWin::Application so let's use it instead of
QX11Info::appScreen.

REVIEW: 122683
2015-03-17 09:44:53 +01:00
Martin Gräßlin 0d51952d78 Provide x11Connection as a property on the KWin::Application
KWin::connection() uses the property to resolve the value instead of
using QX11Info. In practice this doesn't change anything at the moment,
but allows kwin_wayland to provide an xcb connection without depending
on QX11Info.

As we cannot make xcb_connection_t* available as a metatype, the
property's type is set to void*.
2015-03-17 09:44:53 +01:00
Martin Gräßlin fe9873e4b1 Provide x11RootWindow as a property on the KWin::Application
KWin::rootWindow() uses the property to resolve the value instead of
using QX11Info. In practice this doesn't change anything at the moment,
but allows kwin_wayland to provide a root window without depending on
QX11Info.
2015-03-17 09:44:53 +01:00
Martin Gräßlin d66a804bbb Drop not needed includes of QX11Info 2015-03-17 09:44:53 +01:00
Martin Gräßlin c383d6074c Replace QX11Info::appScreen() with KWin::Application::x11ScreenNumber()
No need to go through QX11Info for information we have.
2015-03-17 09:44:53 +01:00
Martin Gräßlin c61ecc887a Replace QX11Info::appRootWindow() by KWin::rootWindow()
No need to go through QX11Info for information we already cache.
2015-03-17 09:44:53 +01:00
l10n daemon script 01b61a9ede 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-03-16 10:12:25 +00:00
l10n daemon script 9361fb8610 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-03-15 09:56:33 +00:00
l10n daemon script 17f808db9a 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-03-14 10:20:33 +00:00
Hrvoje Senjan 3b1f345f4d Merge remote-tracking branch 'origin/Plasma/5.2' 2015-03-13 15:52:24 +01:00
Hrvoje Senjan 9bddd0fe8a Fix installation of GHNS material
plasmapkg is no more

Reviewed-by: Martin Gräßlin
2015-03-13 15:51:20 +01:00
Thomas Lübking b37d88a29f calc undecorated offset *before* removing deco
point of the calculation is to know how much
the window must be moved to de-compensate for
the deco but calculateGravitation() w/o a
deco (thus now w/o borderTop() etc.) is NOOP.

BUG: 344234
FIXED-IN: 5.2.2
2015-03-09 00:41:12 +01:00
Thomas Lübking ac3aef8dfc do not delete and recreate close button
loading the QML/view is not very efficient

BUG: 344676
FIXED-IN: 5.2.2
2015-03-09 00:40:31 +01:00
Thomas Lübking 3458dcb23f Merge branch 'Plasma/5.2' 2015-03-08 23:35:48 +01:00
Thomas Lübking bd28862154 calc undecorated offset *before* removing deco
point of the calculation is to know how much
the window must be moved to de-compensate for
the deco but calculateGravitation() w/o a
deco (thus now w/o borderTop() etc.) is NOOP.

BUG: 344234
2015-03-08 21:56:25 +01:00
Thomas Lübking 99f49fa53b do not delete and recreate close button
loading the QML/view is not very efficient

BUG: 344676
2015-03-08 21:56:25 +01:00
Sebastian Kügler 25fc115a9c Fix loading of effect config plugins
X-KDE-ParentComponents is a list, so we have to check if this list
contains the plugin, not do a string comparison. It seems the
queryparser has become a bit stricter in this case. This query should be
fixed anyway, however, and it fixes a fairly important bug in the effect
system.

REVIEW:122821
2015-03-06 13:16:17 +01:00
Sebastian Kügler 69fccf9c28 Fix loading of effect config plugins
X-KDE-ParentComponents is a list, so we have to check if this list
contains the plugin, not do a string comparison. It seems the
queryparser has become a bit stricter in this case. This query should be
fixed anyway, however, and it fixes a fairly important bug in the effect
system.

REVIEW:122821
2015-03-06 12:22:05 +01:00
Alex Richardson b275daa576 Fix FreeBSD build: std::tan() requires #include <cmath> instead of <math.h> 2015-03-06 03:41:04 +00:00
l10n daemon script 777dc69831 SVN_SILENT made messages (.desktop file) 2015-02-25 11:29:12 +00:00
Martin Gräßlin b56ed80de1 Workaround broken CI system
It doesn't know XCB_GE_GENERIC.
2015-02-25 11:10:31 +01:00
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
Martin Gräßlin d95ab94f0a Migrate away from QX11Info::appTime
The porting to Qt5 broke the timestamp handling in many areas. A deeper
look into Qt's xcb plugin shows that the appTime handling is not
sufficient for KWin's need. E.g. the time is only updated in response to
a property notify event if it's for a Qt created window, which is hardly
ever the case in KWin. Another example is that key press/release events
never updated the appTime.

As the functionality in Qt is rather trivial we can do the timestamp
handling ourselves. We filter all events anyway and it is slightly faster
as we don't have to go through the QPA interface any more.

REVIEW: 122636
2015-02-23 11:02:59 +01:00
l10n daemon script a59a89d36c SVN_SILENT made messages (.desktop file) 2015-02-22 11:32:22 +00:00
l10n daemon script a14e62dadc SVN_SILENT made messages (.desktop file) 2015-02-22 10:26:29 +00:00
Jonathan Riddell 01aae2fa20 add include(ECMOptionalAddSubdirectory) 2015-02-19 17:12:34 +01:00
Jonathan Riddell 325a479e6e add include(ECMOptionalAddSubdirectory) 2015-02-19 17:12:18 +01:00
Jonathan Riddell 63ff7263a3 use ecm_optional_add_subdirectory instead of add_subdirectory for docs, the translations may be incomplete 2015-02-19 17:06:25 +01:00
Jonathan Riddell 9ca75417e0 use ecm_optional_add_subdirectory instead of add_subdirectory for docs, the translations may be incomplete 2015-02-19 17:06:15 +01:00
Lukáš Tinkl ae3d2092eb extract UI messages correctly 2015-02-19 14:41:03 +01:00
Lukáš Tinkl c59f911487 extract UI messages correctly 2015-02-19 14:38:22 +01:00
Martin Gräßlin 5312e5b878 Update KF5 requirement to 5.8 2015-02-19 12:29:04 +01:00
Jonathan Riddell 84954b9e4f Update version number for 5.2.1 2015-02-19 11:34:15 +01:00
Martin Gräßlin caf99f83d5 Require Qt 5.4
REVIEW: 122617
2015-02-19 10:56:50 +01:00
Martin Gräßlin 230f8dea24 Merge branch 'Plasma/5.2' 2015-02-19 10:56:37 +01:00
Martin Gräßlin 7bbb68aad6 Check GL version and/or extension for using texture format GL_R8
BUG: 344301
FIXED-IN: 5.2.1
REVIEW: 122615
2015-02-18 09:09:50 +01:00
Martin Gräßlin 77e6e99209 Use NETWinInfo overload for icons in Group::icon
Reduces number of possible roundtrips by fetching the NETWinInfo for
the leader_wid once and passing it to KWindowSystem::icon. This way
the NETWinInfo can be shared for all sizes instead of having
KWindowSystem::icon create a new instance with roundtrips for each
size.

REVIEW: 122605
2015-02-17 14:29:38 +01:00
Martin Gräßlin 6a4070155f [clientmachine] Use NETWinInfo instead of KWindowInfo
No need to go through the abstraction. We have all needed info after all.
2015-02-17 13:59:04 +01:00