Commit graph

5970 commits

Author SHA1 Message Date
Louis-Francis Ratté-Boulianne 3f53d9179b xwm: Only send configure a window if the new size is different
If we configure a window with the same size and wait for the
sync alarm to go off, the resizing is gonna block. The event is
only handled is the size actually changed.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-05 14:08:15 +00:00
Ilia Bozhinov ef82bdfdd7 xwm: Handle third data entry in client messages
A single client message can be used to modify two properties at once.
That's why when processing such messages we have to check both the second
and the third data entry for states that we must handle.

Signed-off-by: Ilia Bozhinov <iliyabo@hotmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-05 11:21:44 +00:00
Derek Foreman e1af3d8d9d desktop-shell: Handle the fullscreen to maximized case safely
When a client transitions from maximized to fullscreen to maximized (run
weston-terminal, maximize it, hit f11 twice) we're sending size 0,0 for
the unfullscreen configure, which still has maximized set.

This results in clients correctly picking any size they like, and weston
disconnecting them for it.

Instead, pass the correct maximized size.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 21:58:15 +00:00
Derek Foreman 927d9e23fa desktop-shell: refactor maximized size calculation into its own function
We need to calculate maximized size to resolve a bug with unsetting
fullscreen, might as well share the code.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 21:58:08 +00:00
Emilio Pozuelo Monfort 5c3f3575d5 tests: add a create_test_surface function
This doesn't attach a buffer to the surface. This is needed for the
next commit, where we have a test case with a surface that doesn't
have a buffer attached.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 21:58:00 +00:00
Quentin Glidic 85d55540cb input: Do not override keyboard focus on restore
If we start a special (grabbing) client when Weston is unfocused, it
would lose focus when coming back to Weston.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 21:07:38 +00:00
Armin Krezović b9906aaead compositor-x11: Implement mode switching
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 20:51:08 +00:00
Tomohiro Komagata 7861fa9151 clients: simple-egl: Restore window size when un-maximized
The window position was correct but the window size was wrong
when simple-egl returns from maximized window to un-maximized.
Its size should be restored to original size.

Signed-off-by: Tomohiro Komagata <tomohiro.komagata.aj@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:40:31 +00:00
Sergei Trofimovich 43c5a65b03 configure.ac: use AC_HEADER_MAJOR to detect major()/minor()
This change slightly updates c4d7f66c12
which added <sys/sysmacros.h> inclusion.

Autoconf has AC_HEADER_MAJOR to find out which header defines
reqiured macros:
    https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html

This change should increase portability across other libcs.

Bug: https://bugs.gentoo.org/610652
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:38:14 +00:00
Eric Engestrom 0c30fa5503 option-parser: replace int/0/1 with bool/false/true
These are already used as bools by all callers, let's make that official.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:37:33 +00:00
Eric Engestrom 58e056ab2d config-parser: fix short_name type
This field is populated with chars, compared to chars and printed as
a char. It should probably be a char.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:37:25 +00:00
Derek Foreman dc4f9deaee weston-resizor: Don't add new frame callbacks every click
The frame callback added on button click re-adds itself when done,
so adding a new one every click resulted in an ever increasing
number of callbacks.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:21:11 +00:00
Emil Velikov bcfe397df2 gl-renderer: remove unneeded cast
The variable num is of EGLint type.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:13:29 +00:00
Matt Hoosier df573031d0 compositor-drm: fix z-order inversion in plane assignment
As discussed in the following thread:

https://lists.freedesktop.org/archives/wayland-devel/2017-August/034755.html

the existing plane assignment in the DRM backend is vulnerable to
accidental masking of the intended fullscreen surface. This change
adds a simple stateful memory to the plane assignment algorithm
to prevent that.

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:11:46 +00:00
Valery Kartel d4512f6aa1 weston: added missing header time.h
without it I can't built weston on alpinelinux

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:08:50 +00:00
Alexandros Frantzis 8c919b488c tests: Fix integer overflows on 32-bit systems
Ensure that the integer type used in expressions involving
multiplication with NSEC_PER_SEC is large enough to avoid overflows on
32-bit systems. In the expressions fixed by this patch a 64-bit type
(long long) is required.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:06:02 +00:00
Derek Foreman bd9069ffad dnd: Abort with an error message if compositor doesn't support drag and drop
This test isn't particularly useful when the compositor doesn't support
drag and drop - so bail if we fail to create a data source.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:03:29 +00:00
Derek Foreman 11b6242ba9 clients: Don't crash when compositor doesn't support drag and drop
display_create_data_source() can return NULL when there's no data device
manager present.  Instead of carrying on blindly, test its return value.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:03:22 +00:00
Emmanuel Gil Peyrot 55cdf69b4b weston-info: Add support for zwp_linux_dmabuf_v1
This now prints each (format, modifier) tuple, to show which ones the
compositor sends to its clients.  It is only implemented for version 3+,
since I didn’t have any compositor implementing previous versions, and
the old `format` event is deprecated anyway.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-01 17:04:30 +00:00
Emmanuel Gil Peyrot 7092090de9 tests: Mark tests as used so they don’t get removed at link time
Without this attribute, the test macros were making Weston fail to
build with LTO enabled.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-01 16:53:53 +00:00
Emmanuel Gil Peyrot 0f4dbe72d3 tests: Add one more indentation level to some macros
This is a preparatory patch for the next one.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-01 16:53:45 +00:00
Daniel Stone b040974398 gl-renderer: Set pitch correctly for subsampled textures
zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
plane, but wl_shm only takes a single pitch parameter; the pitch for
secondary planes must be inferred.

Multi-plane sub-sampled textures have partial width/height, e.g.
YUV420/I420 has a full-size Y plane, followed by a half-width/height U
plane, and a half-width/height V plane.

GStreamer's waylandsink - the only user of wl_shm YUV formats - expects
the implementation to follow the example of Xv and implicitly divide the
pitch for secondary planes by the subsampling factor. gl-renderer was
not doing this, and instead just using the (larger) stride provided by
the client for all planes in the buffer.

Fix gl-renderer to divide pitch by the subsampling factor when uploading
from subsampled SHM buffers into GL textures, also dividing co-ordinates
when doing offset partial uploads.

Tested with:
  $ gst-launch-1.0 videotestsrc ! waylandsink

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Tested-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
Acked-by: Vincent ABRIOU <vincent.abriou@st.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Fixes: fdeefe4241 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
2017-12-01 16:36:38 +00:00
Joshua Watt 8093fd5db2 clients/editor: Toggle panel visibility on click
If the --click-to-show option is specified, clicking an input field will toggle
the input panel visiblity

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Tested-by: Silvan Jegen <s.jegen@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
2017-11-30 16:15:56 +02:00
Joshua Watt dd61625d18 text-backend: Allow client hiding of input panel
Previously, the hide_input_panel and show_input_panel messages for the text
input protocol were limited to specific cases, such as showing the panel on
activation, or making the panel visible after activation. Now, clients are
allowed to toggle the panel visiblity at will as long as they are the currently
active client

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Tested-by: Silvan Jegen <s.jegen@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
2017-11-30 16:14:30 +02:00
Pekka Paalanen 68f8e47a56 man: mention logind for launching
Logind has been long supported as means to launch Weston without
weston-launch. It's good to note it in the manual.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-11-28 10:24:27 +02:00
Pekka Paalanen a453f4d564 compositor-drm, compositor-fbdev: stop suggesting root
Stop suggesting to run Weston as root, it is only meant for debugging.
Instead, mention the two supported ways to run Weston on DRM and fbdev:
weston-launch helper and logind service.

Cc: "Ucan, Emre (ADITG/ESB)" <eucan@de.adit-jv.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: added forgotten "using" word.]
2017-11-28 10:24:12 +02:00
Pekka Paalanen 1a2adfedea weston-launch: improve help text for -u and -t
Explain that -u requires root and -t requires -u. Most importantly,
document in what format does -t expect the tty to be given.

It has been confusing, because Weston's --tty option takes an integer,
weston-launch takes a full device path.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-11-28 09:18:08 +02:00
Pekka Paalanen 625f56f062 weston-launch: fix -t option parsing
Fix an issue introduced in:

 commit ab4999492c
 Author: Kristian Høgsberg <krh@bitplanet.net>
 Date:   Fri Jul 19 21:26:24 2013 -0700

     weston-launch: Drop sleep_fork option

where the option string accidentally became "t::". That causes

	$ weston-lauch -t /dev/tty4

to be parsed incorrectly, as if -t option had no argument and the tty
path gets passed to weston which errors out because of it.

This patch fixes the above to work as expected.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-11-28 09:17:49 +02:00
Pekka Paalanen 5949e48d1d weston-launch: quit if -t without -u
setup_tty() function uses the tty argument for choosing the tty/VT only
if wl->new_user (the -u option) is given. If the tty option is given
without -u, it will only be used for misleading error messages.

To make it clear to the user that -t without -u does not work the way
one might think, let weston-launch exit with an error in that case.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-11-28 09:17:35 +02:00
Pekka Paalanen 1fdeb68013 weston: add wait-for-debugger option
When you need to start Weston via weston-launch, systemd unit, or any
other runner, it is annoying to try to get in with a debugger,
especially if the thing you are interested in happens at start-up. To
make it easy, a new option is introduced.

The new option, implemented both as a command line option and a
weston.ini option, raises SIGSTOP early in the start-up, before the
weston_compositor has been created. This allows one to attach a debugger
at a known point in execution, and resume execution with SIGCONT.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Ian Ray <ian.ray@ge.com>
2017-11-28 09:17:24 +02:00
Pekka Paalanen 3baf9ce7e8 weston: arm SEGV handler earlier
It is useful to print the backtrace regardless of whether we have a
compositor and a backend initialized yet. Move catch_signals() to the
earliest point in main() and protect the SEGV handler from dereferencing
NULL when we don't yet have a compositor or a backend.

The SEGV handler uses weston_log(), so cannot move catch_signals() any
earlier.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-11-27 15:41:18 +02:00
Alexandros Frantzis 409b01fd6d libweston: Use struct timespec for compositor time
Change weston_compositor_get_time to return the current compositor time
as a struct timespec. Also, use clock_gettime (with CLOCK_REALTIME) to
get the time, since it's equivalent to the currently used gettimeofday
call, but returns the data directly in a struct timespec.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 7d2abcf6c8 libweston: Use struct timespec for touch motion events
Change code related to touch motion events to use struct timespec to
represent time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 27a51b83e5 libweston: Use struct timespec for touch up events
Change code related to touch up events to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 9448deb073 libweston: Use struct timespec for touch down events
Change code related to touch down events to use struct timespec to
represent time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 47e79c860b libweston: Use struct timespec for key events
Change code related to key events to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 80321942e7 libweston: Use struct timespec for axis events
Change code related to axis events to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 215bedc88b libweston: Use struct timespec for button events
Change code related to button events to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 84b31f8956 libweston: Use struct timespec for motion events
Change code related to motion events to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis e6ac2afa56 libweston: Use struct timespec for the output presentation timestamp
Store the output presentation timestamp as struct timespec.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:42:07 +02:00
Alexandros Frantzis 8250a61de1 build,libweston: Use struct timespec for animations
Change code related to animations to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

This bumps the libweston major version due to breakage in the animation
ABI. The commits following this one break more ABI in other parts.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:41:17 +02:00
Alexandros Frantzis 6c2752a863 shared: Add helpers to convert between various time units and timespec
Add helper functions to make it easy and less error-prone to convert
between values in various time units (nsec, usec, msec) and struct
timespec. These helpers are going to be used in the upcoming commits to
transition the Weston codebase to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:18:25 +02:00
Alexandros Frantzis e2a5f9e02d shared: Add timespec_is_zero helper
Add a helper function to check if a struct timespec is zero. This helper
will be used in the upcoming commits to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:18:25 +02:00
Alexandros Frantzis 0343c6ac69 ivi-shell: Fix incorrect use of logical instead of bitwise operator
Fix the code to use the correct bitwise AND operator '&', instead of the
currently used logical AND operator '&&', to check the value of a bit
flag in a bit mask.

This problem was reported as a warning when building with clang.

Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
2017-11-24 14:02:19 +02:00
Reynaldo H. Verdejo Pinochet 71c4f70e08 buildsystem: add missing pkg-config stub for libweston uninstalled
-uninstalled.pc files are a pkg-config facility for working with
uninstalled libraries.

With pkg-config, foo-uninstalled.pc overrides foo.pc. foo-uninstalled.pc
should never be installed, and will be generated with references to the
build directory.

If you set up your environment so pkg-config looks for .pc files in your
build directories, you can use this to build and link against libraries
you haven't installed with "make install".

This can save time and space over installing with a prefix.

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-11-10 12:50:41 -06:00
Pekka Paalanen 323d4b37a0 compositor-wayland: fix shm_buffer damage init
It appears that wayland_shm_buffer::damage is in the global coordinate
space. Therefore initializing it to width x height at 0,0 is not correct
for any output not positioned at 0,0. That is, all outputs after the
first one get it wrong.

Initialize it from the output region, which is in the global coordinate
space.

While at it, add a comment to note that damage is in global coordinate
space. As I can see, this was the last confusion about it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-10-24 12:51:35 +03:00
Armin Krezović 2b3c97d560 compositor-wayland: fix damage coordinates with pixman renderer
Damage coordinates are in global coordinate space, and they need to
be translated to local coordinate space so multiple outputs can work.

This path now matches the similar path in the X11 backend.

This patch fixes the appearance of multiple windows in the parent
compositor. Previously, all windows except the one with nested output
position 0,0 would have their damage for the parent wl_surface always
fall outside of the wl_surface, save the decorations which were handled
separately. If the parent compositor was Weston/GL, this would lead to
the output area remaining black as partial GL texture uploads would
practically never update the texture. If the parent compositor was
Weston/pixman, the parent windows would not update on screen unless
something else caused the area to be repainted.

[Pekka: adjusted commit message]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-10-24 12:51:35 +03:00
Pekka Paalanen 99c92e7e52 compositor-wayland: clarify wl_display_connect() error
Clarify the error message to explicitly say one was trying to connect to
a parent Wayland compositor. This hopefully is a good enough hint on
what using the wayland-backend is trying to do.

Add the command line display option value and WAYLAND_DISPLAY values for
good measure. WAYLAND_SOCKET is not shown as libwayland-client removes
it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-10-24 12:51:35 +03:00
Pekka Paalanen 441954325e compositor-wayland: windowed/fullscreen not on fullscreen-shell
The set_windowed and set_fullscreen functions are only useful on a
desktop shell, and never called on fullscreen-shell.

Remove the confusing dead code, and ensure we notice if these functions
get called in the wrong environment.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-10-24 12:51:35 +03:00
Pekka Paalanen 7d2fc9291b compositor-wayland: allow to unset fullscreen
To be more symmetric with wayland_output_set_fullscreen(), implement the
xdg-shell path in wayland_output_set_windowed(). This should make it
possible to use the fullscreen key binding to toggle between a floating
window and fullscreen also under xdg-shell.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
2017-10-24 12:51:35 +03:00