Commit graph

12930 commits

Author SHA1 Message Date
Martin Gräßlin
b824175e05 [input] Set a default xkb modifier map 2015-04-01 11:05:45 +02:00
Martin Gräßlin
2b0a837340 [wayland] Create QPainterBackend through the AbstractBackend
SceneQPainter delegates creation to the AbstractBackend removing the
casting logic.
2015-04-01 11:05:45 +02:00
Martin Gräßlin
e1ae0b8bc4 [wayland] Create OpenGLBackend through the AbstractBackend
Replaces casting logic in the SceneOpenGL. Now the create is delegated
to the backend allowing also to move the ifdef logic to where it belongs.
2015-04-01 11:05:45 +02:00
Martin Gräßlin
00844ffba7 Bind cmake option HAVE_WAYLAND_EGL to KWIN_HAVE_EGL
If we don't have EGL we also do not want Wayland_EGL.
2015-04-01 11:05:45 +02:00
Martin Gräßlin
65839e1617 [wayland] Create Screens through the AbstractBackend
The AbstractBackend provides a virtual method to create the Screens.
A concrete backend can implement this method to create the backend
specific Screens instance.

This removes the casting logic from Screens::create.
2015-04-01 11:05:45 +02:00
Mika Allan Rauhala
3389c7569f Adapt to KDecoration API changes
Adapt to API changes introduced by b62e8888cd39301e00ad98dfe791fa66676408fb.
It adds DecoratedClient::color(group, role) for getting colors that are
not included in QPalette. Breeze used to read these colors from
kdeglobals, breaking per window color schemes. KWin now handles reading
these colors along with QPalette loading with DecorationPalette.

REVIEW: 122883
2015-03-31 15:26:55 +02:00
Martin Gräßlin
66e92347a8 [wayland] Initialize WaylandSeat::m_touch
Without it results in a nice crash when trying to use with touch support.
Having ways to test clearly improves ;-)
2015-03-31 11:22:58 +02:00
Mika Allan Rauhala
2217c1038f Add Quick Tile Window to the Top and Bottom shortcuts
This adds "Quick Tile Window to the Top" and "Quick Title Window to the Bottom" shortcuts. These are
useful for those using displays that are in portrait orientation.

CCBUG: 310005
REVIEW: 123153
2015-03-31 11:10:13 +02:00
Martin Gräßlin
f7bed6a003 [libinput] Pass device capabilities to Wayland::Server::SeatInterface
We handle device added/remove to monitor whether we have keyboard,
pointer and touch devices and emit signals. Those are used to update
the SeatInferface from InputRedirection.
2015-03-26 16:19:26 +01:00
Martin Gräßlin
93b3626a37 [libinput] Try to dispatch events directly after setup
Without we might end in a race as kwin_wayland might start the Xwayland
server before we have a populated seat interface.
2015-03-26 16:17:51 +01:00
Martin Gräßlin
60783b8228 Touch support in libinput 2015-03-25 16:40:17 +01:00
Martin Gräßlin
36f987198d [wayland] Add support for processing touch events
InputRedirection gains basic support for processing touch events which
are delegated to KWayland::Server.

WaylandBackend accepts touch events from KWayland::Client and delegates
them to the InputRedirection.
2015-03-25 14:50:14 +01:00
Martin Gräßlin
2e2ea354b6 [kcmkwin/tabbox] static_cast QKeyEvent
Fixes a defect reported by coverity.
2015-03-25 08:18:12 +01:00
Nick Shaforostoff
da5328953a fix memleak in mouseclick effect
REVIEW: 123114
2015-03-25 00:02:24 +00:00
Martin Gräßlin
219946edce Fix build with HAVE_WAYLAND and HAVE_X11_XCB but no HAVE_WAYLAND_EGL
Let's try again.
2015-03-24 10:50:46 +01:00
Martin Gräßlin
2d1622ea09 Fix build without Wayland, but with HAVE_X11_XCB
Build error in SceneOpenGL.
2015-03-24 10:43:48 +01:00
Andrey Bondrov
d7fd252484 Merge branch 'Plasma/5.2' 2015-03-24 18:52:15 +10:00
Martin Gräßlin
289ec53350 Add basic information about the X server to supportInformation
* Vendor name
* Vendor release
* Protocol version
* All Extensions used by KWin (name, present and version)

Need for this recognized due to a bug related to no xrandr present.

CCBUG: 345448
2015-03-24 08:54:03 +01:00
Martin Gräßlin
b3145f294f Print out all build options in supportInformation
Based on experience that builds might not have optional features
(packagers running automated builds, devs using kdesrc-build).
2015-03-23 16:02:12 +01:00
Martin Gräßlin
b405fda213 Drop support for KAppmenu
We released three versions with it being disabled and it doesn't look
like it will come back any time soon. Also the build was broken at least
since the repo splitting due to incorrect path to dbus xml.

In addition the connection to decorations got dropped already with the
change to kdecoration2. Which means it anyway needs large adjustements
to get the code working again.

Overall it doesn't look like it makes lots of sense to keep the code
around for someone working on it in future. If that happens this change
can be reverted.
2015-03-23 15:56:50 +01:00
Martin Gräßlin
5088314e9f Drop KWIN_BUILD_DESKTOPCHANGEOSD from conig-kwin.h
Not referenced anywhere in build system.
2015-03-23 15:26:02 +01:00
Martin Gräßlin
49f58059c6 [wayland] Backends are no longer singletons
They are installed in the WaylandServer, thus we don't need an explicit
singleton accessor. If we need to differentiate we can cast.
2015-03-23 14:29:07 +01:00
Andrey Bondrov
b3a9f41fd0 Fix title height for maximized windows with Aurorae decorator 2015-03-23 23:27:09 +10:00
Martin Gräßlin
93e717b072 [wayland] Drop Wayland support in SceneXRender
It didn't get adjusted for Xwayland, so probably doesn't work any more.
The rendering mode seems not very useful if honest and it's better to
use the QPainter backend.
2015-03-23 13:47:21 +01:00
Martin Gräßlin
ee186a68c4 [wayland] Improve decision which backend to create
Both Wayland and X11 backend are bound to the --windowed flag. Which
one to create is decided whether DISPLAY or WAYLAND_DISPLAY env variables
are set with Wayland having precedence over X11. Passing the display as
command line argument overwrites the env variable and takes further
precedence. E.g. if WAYLAND_DISPLAY is exported and --x11-display
argument is provided, it will create X11 backend. Similarly there is now
a --wayland-display command line argument.

If no backend got created, kwin_wayland will exit.

The singleton variant of WaylandBackend is adjusted to take the display
as argument and pass it to the Connection.
2015-03-23 12:45:21 +01:00
Martin Gräßlin
ed504d0c50 Remove unused includes from wayland_backend.cpp 2015-03-23 10:23:10 +01:00
Martin Gräßlin
622d333c11 Do not find Wayland::Client
No longer used.
2015-03-23 10:11:57 +01:00
Martin Gräßlin
75d60d4f85 [wayland] Make Wayland::Cursor a proper optional build dep
Only needed in the Wayland backend and can easily be ifdefed there.
2015-03-23 10:10:38 +01:00
Martin Gräßlin
3c6fd0190b [tests] Only use KWayland in the waylandclienttest
No need for Wayland::Client any more - KWayland encapsulates the usage.
2015-03-23 09:54:37 +01:00
Martin Gräßlin
dce8e74eb0 Do not find Wayland::Server
Not needed, we have the KWayland wrapper.
2015-03-23 09:18:55 +01:00
Simeon Bird
1de1e80d50 Fix hang on nvidia hardware when deleting sync objects
When a sync object is deleted, the fence it is connected to must already
be signalled, or the driver will busy-wait forever.
Signal fences before deleting syncs to avoid this.

BUG: 343551
FIXED-IN: 5.3
REVIEW: 123090
2015-03-22 23:55:48 -04:00
Christophe Giboudeaux
bea55dc614 -Wmissing-include-dirs 2015-03-22 22:36:26 +01:00
Christophe Giboudeaux
0fb0176e4b Don't display anything after showing the found packages. 2015-03-22 22:25:38 +01:00
Andrey Bondrov
4922b6d1cd Fix a typo in aurorae QML code 2015-03-22 21:48:01 +10:00
Thomas Lübking
d1063b2507 Merge branch 'Plasma/5.2' 2015-03-21 01:26:53 +01:00
Thomas Lübking
e26a3db030 Fix closeview hiding: move it outside rootgeometry
The closeview is not hidden because that causes
invalid textures (apparently QML related) and
deleting/recreating causes massive I/O overhead
on effect invocation.

As last resort, the window is "hidden" by moving
it out of the root window geometry.

Jonathan, please RESPIN kwin - sorry for the trouble
... again.

BUG: 345159
REVIEW: 123035
CC: riddell@gmail.com
2015-03-21 01:22:36 +01:00
Martin Gräßlin
5764a087ee Fix build without Wayland (try 2)
Set HAVE_X11_XCB to FALSE if not building with Wayland support.
2015-03-20 16:01:04 +01:00
Martin Gräßlin
8d8c6b09ac Fix build without Wayland (try 1) 2015-03-20 15:46:24 +01:00
Martin Gräßlin
bcf5eedb0f [autotests] Drop linking against XCursor
No longer needed.
2015-03-20 15:42:29 +01:00
Martin Gräßlin
405e366815 Add safety check to InputRedirection::findToplevel
InputRedirection might be invoked to process input events prior to
Workspace being started.
2015-03-20 14:43:47 +01:00
Martin Gräßlin
9a0fd94013 Introduce AbstractBackend as base class for Wayland and X11Windowed backend
The AbstractBackend registers itself in the WaylandServer allowing
external users to easily get to the backend and not needing to test
manually which backend is used.
2015-03-20 14:41:03 +01:00
Martin Gräßlin
dae8eed3a8 Introduce a shared base class for the EGL backends
There's quite some overlap and duplicated code. This AbstractEglBackend
tries to merge the two backends a little bit again.

This also introduces an AbstractEglTexture which supports both X11 and
Wayland "pixmaps" so that EglOnXBackend can support Wayland buffers.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
a1642a85d3 Allow using EGLOnXBackend with X11WindowedBackend
Mostly refactoring to not take the global X11 information (connection,
display, etc.). Adds a dedicated ctor overload which takes the
X11WindowedBackend.

SceneOpenGL is adjusted to create an EGLOnXBackend instead of Wayland one
if the X11WindowedBackend is used.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
3cc1032839 [wayland] Create xcb_connection through XLib in windowed mode
Adds optional dependency to X11_XCB and gets used in X11WindowedBackend
to create an XLib Display if dependency is present.

This allows to create an EGL backend for the X11WindowedBackend.
2015-03-20 14:08:54 +01:00
Martin Gräßlin
6bf44b7db4 [wayland] Add an X11 output backend
This new backend allows to start a kwin_wayland server nested on an
X-Server by using a normal X11 window as output. This allows testing
kwin_wayland without needing to start another Wayland server first.

The behavior is triggered by using new command line arguments:
--windowed
--x11-display=<:0>

With optional --width and --height arguments.

In this mode the WaylandBackend is not created at all.

So far the backend is not fully integrated yet and only the QPainter
backend supports this mode.
2015-03-20 14:08:53 +01:00
Martin Gräßlin
c1ab92d8b4 Make it possible to use XCB::Atom with non-default xcb_connection_t
Preparation step for having an X11 backend in kwin_wayland which has
connection() point to Xwayland and another connection to the parent
X server.
2015-03-20 14:08:53 +01:00
Martin Gräßlin
e886bd7c78 Adjust to newer libinput and require at least 0.10
There was API changes regarding axis event handling.
CCBUG: 342893
2015-03-20 12:42:57 +01:00
Martin Gräßlin
7d797387d7 Add safety check for QueryTree
xcb_qeuery_tree should fail and we should not just assume that the
call succeeds.

Crash reported by Harald Sitter.
2015-03-20 12:39:33 +01:00
Martin Gräßlin
e2c422dcb5 Woraround possible broken cursor when creating mouse interception window
The xcb_cursor_t returned by xcb-cursor library might be broken. If we
set such a broken cursor directly in the create window call it will fail
with a BadCursor value causing effects to break.

This change works around this problem by creating just the window and
moving the possible breaking call into a change window call. That will
still fail, but the window is working.

In addition it performs a safety check by only installing the cursor
if it's not XCB_CURSOR_NONE.

BUG: 344006
REVIEW: 123025
2015-03-20 10:39:11 +01:00
Martin Gräßlin
3aa4c8d635 Add cursor resolving alternatives
The alternative names are taken from the xcursortheme kcm in
plasma-desktop. An example theme where they are needed is "dmz".
2015-03-20 10:39:11 +01:00