Commit graph

934 commits

Author SHA1 Message Date
Martin Gräßlin
ca3b8b0cec Add test case for operator cast in Compositor 2014-09-22 11:03:46 +02:00
Martin Gräßlin
ebac7d3c03 Verify that Pointer isValid in the autotest 2014-09-22 11:02:16 +02:00
Martin Gräßlin
ba9270a887 Pass parent to Client::Keyboard in TestWaylandSeat
This ensures that the Keyboard doesn't leak in the test.
2014-09-22 11:00:02 +02:00
Martin Gräßlin
acb08e276d Add unit test for Client::Compositor::destroy 2014-09-22 10:24:21 +02:00
Martin Gräßlin
6f2d49e680 ShmPool returns QWeakPointer<Buffer> instead of Buffer*
The Buffers are exclusively hold by ShmPool. The user of a Buffer is not
supposed to delete it as a no longer used Buffer should be reused by the
ShmPool.

To make it obvious that the ownership of the pointer is not passed to the
user the return type is changed to QWeakPointer. This also allows the
ShmPool to destroy Buffers as needed.
2014-09-22 09:54:10 +02:00
Martin Gräßlin
aa26a42432 Do not include wayland-client-protocol.h in test_shm_pool.cpp
This should fix the build on CI system.
2014-09-22 09:01:24 +02:00
Martin Gräßlin
6394b6cd8c Add unit test for ShmPool
The unit test found a few problems which are now addressed
* getBuffer did not check the format when reusing a buffer
* creatBuffer used the wrong method on QSize to check whether it is empty
* destroy didn't call destroy on the Buffer. This is now added by moving
  the Buffer::Private in a dedicated header which can also be included
  from the ShmPool
2014-09-22 08:52:05 +02:00
Pier Luigi Fiorini
d8e4f5edf9 Add Review Board configuration 2014-09-21 11:33:11 +02:00
Martin Gräßlin
9ae04f2100 Extend test_wayland_surface to test frame rendered callback 2014-09-20 16:28:47 +02:00
Martin Gräßlin
c14bbe9c53 Change Client::ShmPool to return Client::Buffer* instead of wl_buffer* 2014-09-20 15:11:40 +02:00
Martin Gräßlin
e33c005118 Add support for Formats to Buffer and ShmPool
So far only ARGB32 and RGB32 are supported. The format is an optional
argument to all the createBuffer and getBuffer calls with a default
for ARGB32.
2014-09-19 14:53:03 +02:00
Martin Gräßlin
2bef3d08ef Check maximum supported version in Client::Registry
Ensure that we do not connect to a version which our client library
does not support. If we would allow higher versions we would run the
risk that the wayland library calls into not existing callbacks.
2014-09-19 10:54:09 +02:00
Martin Gräßlin
4d77c197a9 Add convenient create methods to Registry
These methods allow to create the Interface objects and set them up
directly.
2014-09-19 10:42:44 +02:00
Martin Gräßlin
4d70ace4df Add a Registry::create overload taking the ConnectionThread object
This means we don't need to pass the wl_display* around.
2014-09-19 09:52:50 +02:00
Martin Gräßlin
cdd2ab9b78 Do not install Server library
It's not yet used by KWin, so we don't need to expose it yet.
This gives us more time to fine tune the API.
2014-09-19 09:46:55 +02:00
Martin Gräßlin
e448b84a82 Add d-pointer to Server::SurfaceInterface
It also adds a
static SurfaceInterface *get(wl_resource*)
to SurfaceInterface which can find the SurfaceInterface for the
given wl_resource. This is needed for ShellSurfaceInterface which
can no longer just cast the wayland user data.
2014-09-19 07:06:31 +02:00
Martin Gräßlin
98ce3ec2b9 Add d-pointer to Server::ShellSurfaceInterface 2014-09-18 19:25:11 +02:00
Martin Gräßlin
b2f6704560 Add d-pointer to Server::ShellInterface 2014-09-18 18:51:35 +02:00
Martin Gräßlin
c2f89128d5 Add d-pointer to Server::KeyboardInterface 2014-09-18 17:14:50 +02:00
Martin Gräßlin
8eb325ee69 Add d-pointer to Server::PointerInterface 2014-09-18 16:58:23 +02:00
Martin Gräßlin
4b3f8ccc8d Add d-pointer to Server::SeatInterface 2014-09-18 16:35:28 +02:00
Martin Gräßlin
5a0ad8c648 Add d-pointer to Server::OutputInterface 2014-09-18 16:00:21 +02:00
Martin Gräßlin
2bee5b0e2b Add d-pointer to Server::Display 2014-09-18 15:40:22 +02:00
Martin Gräßlin
6fbb8462d4 Add d-pointer to Server::CompositorInterface 2014-09-18 15:31:01 +02:00
Martin Gräßlin
7de67ceb61 Add d-pointer to Server::BufferInterface 2014-09-18 15:21:25 +02:00
Martin Gräßlin
f2628cf831 s/kwin/kwayland in test names 2014-09-17 16:22:34 +02:00
Martin Gräßlin
9b8e9c2e89 Drop KWIN_ from include guards 2014-09-17 16:20:56 +02:00
Martin Gräßlin
677e8b66a7 Use namespace KWayland::Client instead of KWin::WaylandServer
It's no longer part of KWin.
2014-09-17 16:17:26 +02:00
Martin Gräßlin
a8c7c16c94 Use namespace KWayland::Server instead of KWin::WaylandServer
It's no longer part of KWin.
2014-09-17 16:10:38 +02:00
Martin Gräßlin
3c87cea7a8 Change to LGPLv2+
I'm the only copyright holder of the code in this repository, thus
I can change from GPL to LGPL!
2014-09-17 15:57:56 +02:00
Martin Gräßlin
8fee17fc79 Install library and headers 2014-09-17 15:47:42 +02:00
Martin Gräßlin
5e54a86d5e Generate export headers and use it in our headers
Auto tests are adjusted to link against the library instead of compiling
the source files.
2014-09-17 15:10:43 +02:00
Martin Gräßlin
e763d9acc0 Add a build system
Framework style build system which generates two libraries:
* KF5WaylandClient
* KF5WaylandServer

autotests are adjusted to compile again. They need to be changed to
use the libraries once the export header gets generated.
2014-09-17 14:35:33 +02:00
Martin Gräßlin
2dbf5e95cf Import server autotests 2014-09-17 13:25:46 +02:00
Martin Gräßlin
bc93c5c6a8 Move all files to autotests/server 2014-09-17 13:24:51 +02:00
Martin Gräßlin
3c89460dd9 Import client autotests 2014-09-17 13:23:48 +02:00
Martin Gräßlin
faa80cefb7 Move all files to autotests/client 2014-09-17 13:23:06 +02:00
Martin Gräßlin
0cd3cbcf79 Merge in server related commits 2014-09-17 13:22:00 +02:00
Martin Gräßlin
37c5318375 Move all files to src/server 2014-09-17 13:20:55 +02:00
Martin Gräßlin
8e54a479f9 Move files to src/client 2014-09-17 13:19:15 +02:00
Martin Gräßlin
00802824d7 [autotests/wayland_client] Make TestWaylandShell more robust 2014-09-03 21:31:10 +02:00
Martin Gräßlin
08def82e13 [autotests/wayland_client] Improve TestWaylandShell
Uses our own Wayland server instead of starting Weston and adds
tests for the interface removed signals.
2014-09-03 21:13:25 +02:00
Martin Gräßlin
7003d80173 [kwin_wayland] Add assert in Display::setRunning
Making the impossible condition an assert instead of a return.
2014-09-03 20:04:31 +02:00
Martin Gräßlin
2ccaa4342a [kwin_wayland] Fix Display::outputs
Should return a const-ref not a const copy.
2014-09-03 20:03:13 +02:00
Martin Gräßlin
1574c47d27 [kwin_wayland] Test that Seat gets destroyed when Display terminates 2014-09-03 20:02:42 +02:00
Martin Gräßlin
d080ce7356 [kwin_wayland] Test adding/removing Outputs in TestWaylandServerDisplay 2014-09-03 20:01:54 +02:00
Martin Gräßlin
b51fb1f8b9 [kwin_wayland] define WL_SEAT_NAME_SINCE_VERSION if not defined
Apparently not yet in wayland server library on build.kde.org.
2014-09-02 11:11:26 +02:00
Martin Gräßlin
70dacba26f [kwin_wayland] Add SeatInterface to server module
So far the Seat interface is provided together with pointer and
keyboard. As always touch is not yet implemented. The pointer interface
is still lacking the set cursor callback. Keyboard on the other hand is
complete.

Both Keyboard and Pointer have the concept of a focused surface and only
to the bound interface belonging to the same client as the focused
surface events are sent.

The change comes with a set of new auto tests also verifying the client
side which wasn't possible before as we couldn't fake events.
2014-09-02 10:55:33 +02:00
Martin Gräßlin
3c7a59ba9e [kwin_wayland] Add SeatInterface to server module
So far the Seat interface is provided together with pointer and
keyboard. As always touch is not yet implemented. The pointer interface
is still lacking the set cursor callback. Keyboard on the other hand is
complete.

Both Keyboard and Pointer have the concept of a focused surface and only
to the bound interface belonging to the same client as the focused
surface events are sent.

The change comes with a set of new auto tests also verifying the client
side which wasn't possible before as we couldn't fake events.
2014-09-02 10:55:33 +02:00
Martin Gräßlin
9d780deeb2 [kwin_wayland] Add SeatInterface to server module
So far the Seat interface is provided together with pointer and
keyboard. As always touch is not yet implemented. The pointer interface
is still lacking the set cursor callback. Keyboard on the other hand is
complete.

Both Keyboard and Pointer have the concept of a focused surface and only
to the bound interface belonging to the same client as the focused
surface events are sent.

The change comes with a set of new auto tests also verifying the client
side which wasn't possible before as we couldn't fake events.
2014-09-02 10:55:33 +02:00