Commit graph

12472 commits

Author SHA1 Message Date
Martin Gräßlin
c0c57d7076 KDecoration2::DecorationBridge uses std::unique_ptr 2014-10-20 17:42:50 +02: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
Martin Gräßlin
015c59d9fd Fix build if there is no libinput 2014-10-20 15:01:12 +02:00
Martin Gräßlin
da5ee2ba93 Add sanity checks before updating pointer position and on screen changes
We don't want the cursor to leave the visible area, so better check that
the cursor doesn't leave it. And when the screens changes better check
that the cursor is still on a visible screen. If not: put it back to the
center of the closest screen.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
ff87c989ba Center initial pointer position on screen in libinput mode 2014-10-20 14:51:24 +02:00
Martin Gräßlin
2a6cd5010a Set a default cursor when creating the WaylandCursor 2014-10-20 14:51:24 +02:00
Martin Gräßlin
f545eeb087 Connect pointer events from libinput 2014-10-20 14:51:24 +02:00
Martin Gräßlin
96d6a55ea8 Do not create a WaylandSeat if we use libinput 2014-10-20 14:51:24 +02:00
Martin Gräßlin
15a1a5b70f Add command line option to enable libinput support
kwin_wayland gains a new command line option to enable libinput support.
This is needed as logind blanks the VT when the session controller
releases the control. So a nested compositor can seriously affect the
primary session. Thus it needs a dedicated command line switch to
enable it.

By default libinput support is disabled for kwin_x11 and can be enabled
for kwin_wayland in case KWin is compiled with libinput support.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
6a032e78b7 Suspend/Resume libinput when logind session Active changes
LogindIntegration starts monitoring the Active property on the session
and emits a signal when the state changes. The LibInput::Connection
connects to this signal during the setup and uses it to suspend/resume
the libinput context.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
a918591fef Use Logind to open/close devices needed by libinput
With libinput we have the problem that we need to have privileges to
open the device files. In order to not need wrappers or suid bits, we
use logind. This means that kwin_wayland has to be the session controler.

A LogindIntegration is added to connect to logind and wrap the dbus
calls. This is based on the logind integration done for ksld in
ksmserver. The LogindIntegration is started by Workspace and the
InputRedirection tries to become the session controller and starts the
libinput integration only after this succeeded.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
c4bb3d11fc Initial support for libinput
Libinput is an optional dependency for getting low level input events.
As opening the input devices requires root privs this is rather
pointless in the current state. But there is a small added test app which
can be executed with root privs to demonstrate the functionality. To
properly get input events we need a wrapper like it's used in weston.

So far the following is setup:
* opening devices found by udev
* forwarding keyboard events to InputRedirection
* forwarding pointer button events to InputRedirection
* forwarding pointer axis events to InputRedirection
* signals emitted for pointer motion events

Pointer motion events need some further work as they are provided
as delta events. We need to track that and map them properly.

Also missing are touch events due to me not having a touch screen.
It should be fairly simple to setup the touch events, though.

Also hotplugging of devices is not yet implemented.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
075422fc5e [effects] Add type property to StartupFeedback Effect
Allows to read the configured type in support information.
2014-10-20 14:50:41 +02:00
l10n daemon script
5288363274 SVN_SILENT made messages (.desktop file) 2014-10-17 09:07:36 +00:00
Martin Gräßlin
c2185c9530 Drop check whether WAYLAND_DISPLAY env is set
It was used to check whether we should create the Wayland interaction,
but now that is in kwin_wayland and kwin_x11 doesn't even try to create
the WaylandBackend.
2014-10-17 09:28:15 +02:00
Martin Gräßlin
1829345a2f Support setting cursor image as a SubSurface
The idea is to manage the cursor position by ourself. This is needed
when KWin gains libinput support and doesn't rely on the Seat anymore.
The suggestion for this is to use SubSurfaces. The nice side-effect is
that we can do cursor warping again which we need e.g. for ScreenEdge
activation or for the kill helper, etc. Clients on the other side
still cannot (and should not) warp the pointer.
2014-10-16 16:39:49 +02:00
Martin Gräßlin
2fec4d55fc Move X11CursorTracker from WaylandSeat to WaylandBackend
Allows it to be easily re-used in case we don't have a Seat.
2014-10-15 14:55:31 +02:00
Martin Gräßlin
fd0d966652 X11CursorTracker emits signal when a new cursor image needs to be installed
This means the X11CursorTracker is no longer bound to the WaylandSeat.
Instead the WaylandSeat just connects to the signal emitted by the
X11CursorTracker. This allows to use the X11CursorTracker also in cases
where we don't use a Seat for setting the cursor image.
2014-10-15 14:29:26 +02:00
Martin Gräßlin
752de2d888 Use Registry::interfacesAnnounced signal for WaylandBackend::createSurface
We are interested in going into createSurface exactly once when
everything is ready. This is something we now know due to the new signal
in Registry. So instead of multiple entry points there is just one.
2014-10-15 12:37:20 +02:00
Jonathan Riddell
b23a19e93b Update version number for 5.2 development 5.1.90 2014-10-14 12:34:56 +02:00
Axel Davy
1e38c38c1f Add an env var KWIN_DBUS_SERVICE_SUFFIX to set a different dbus service name
Signed-off-by: Axel Davy <axel.davy@ens.fr>

REVIEW: 120028
2014-10-14 07:56:06 +02:00
l10n daemon script
98b2402688 SVN_SILENT made messages (.desktop file) 2014-10-10 09:32:35 +00:00
Jonathan Riddell
15e41ce842 Update version number for 5.1.0 2014-10-09 11:11:41 +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
l10n daemon script
1f2bb4232b SVN_SILENT made messages (.desktop file) 2014-09-30 10:55:14 +00:00
l10n daemon script
6dcd8f4a01 SVN_SILENT made messages (.desktop file) 2014-09-28 14:28:25 +00:00
Volker Krause
5db2d5a556 Make constants const, saves a few symbols in the .data section. 2014-09-27 20:30:49 +02:00
Martin Gräßlin
1bb1ab44af Add test case for ScreenEdge::check
Behaves similar to the check with enter notify event.
2014-09-27 12:28:54 +02:00
l10n daemon script
857610668e SVN_SILENT made messages (.desktop file) 2014-09-27 08:47:58 +00:00
Martin Gräßlin
6b8075ddbf Test case for Client activation on screen edge 2014-09-27 08:18:20 +02:00
Martin Gräßlin
883445d5e8 Add an auto-test for ScreenEdges
The new test does not cover ScreenEdges completely, so far the
following areas are handled:
* creating of the edges
* reserving of edges
* trigger callback
* cursor pushback
* blocking of edges for fullscreen active clients
2014-09-26 14:01:44 +02:00
Martin Gräßlin
1416ff0994 Fix VirtualDesktopGrid::size for one desktop
The default was set that the grid size for one desktop is (1, 2)
which doesn't make any sense at all - it should be (1, 1).

This most likely only affects the unit test as in production the
default layout is taken fron NETRootInfo.
2014-09-25 12:49:18 +02:00
Martin Gräßlin
2d19afd3fc Drop unused include from screenedge.cpp 2014-09-25 09:29:28 +02:00
Martin Gräßlin
a7cf808dea Improve the TestScreens autotest 2014-09-25 08:45:23 +02:00
Martin Gräßlin
1e2f491176 Improve auto-tests for xcbutils.h 2014-09-24 21:04:15 +02:00
l10n daemon script
fd8006c546 SVN_SILENT made messages (.desktop file) 2014-09-24 08:30:00 +00:00
Martin Gräßlin
7242f64d4c Change wl_event_queue to KWayland::Client::EventQueue
Requires e708af8c9dfaa2eb0d95f5e2b5059890885c5f74 in kwayland.
2014-09-23 13:15:49 +02:00
Martin Gräßlin
b8837b66f3 ShmPool returns QWeakPointer<Buffer> instead of Buffer*
Requires effad12d8b1169d9ffe851fc3f0143eeb8deb10d in kwayland.
2014-09-22 09:59:58 +02:00
l10n daemon script
08540b45eb SVN_SILENT made messages (.desktop file) 2014-09-21 08:48:08 +00:00
Martin Gräßlin
5eceda4ae6 ShmPool returns Buffer instead of wl_buffer
Requires c561316236279754c5570009ec6adb5da215efd8 in kwayland.
2014-09-20 15:13:17 +02:00
Martin Gräßlin
6833581bbb [scene_qpainter] Use image format RGB32 as back buffer
No need for ARGB as our background is fully black anyway.
2014-09-19 15:01:59 +02:00
Martin Gräßlin
237ee7fcc7 wayland_client and wayland_server moved to kwayland
kwayland is provided by kde:kwayland and is located at
kde/workspace/kwayland

It's an optional build dependency needed only for kwin_wayland.
2014-09-19 13:59:51 +02:00
l10n daemon script
e340d1ba05 SVN_SILENT made messages (.desktop file) 2014-09-19 09:03:02 +00:00
Martin Gräßlin
2573d5e711 Workaround for systems not yet having XCB 1.10
If the new used event types are not present, we define them.
This should fix the broken build on the CI system.
2014-09-19 10:04:00 +02:00
Martin Gräßlin
58adbe4d80 Add KF5 version requirement to 5.3.0
5.3.0 is the next upcoming release and we currently depend on new
features added to KWindowSystem.
2014-09-19 07:44:42 +02:00
Fredrik Höglund
ad0abdc812 Add support for GLX_INTEL_swap_event
Enable swap events and use them to defer rendering of the next frame
until the last glXSwapBuffers() call has completed.
2014-09-18 20:21:20 +02:00
Fredrik Höglund
29795f49e8 Add support for GLX in Xcb::Extensions 2014-09-18 20:21:20 +02:00
Fredrik Höglund
869ebdd4c0 Add an X11EventFilter class
This class provides an event filter, specific to an event type, that
can be registered with Workspace to filter events.
2014-09-18 20:21:20 +02:00
Fredrik Höglund
32e9de1e23 Refactor the swap completion interface
Move the buffer-swap-pending state from the compositing backends to
the Compositor class. The Compositor is the only class that needs to
access the state, and this way it to do it without calling through
a chain of virtual functions. This commit adds two new functions to
Compositor; aboutToSwapBuffers() and bufferSwapComplete(). The
backends call these functions to set and reset the buffer-swap-pending
state.

This commit also renames a number of functions and variables to make
their meaning clear.

The act of promoting the contents of the back buffer to become the
contents of the front buffer is referred to as posting the buffer,
presenting the buffer, or swapping the buffers; rendering the buffer
is what paintScreen() does.
2014-09-18 20:21:20 +02:00