This makes simple-shm act like a very simple fullscreen shell client. This
is the kind of interaction one would expect out of a boot splash screen or
similar.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This allows to test the effect of setting only source rectangle or
destination size, in addition to setting both.
In weston-scaler -h output, add descriptions on what the result in each
mode should look like.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.
Clients that need to be redrawn when the focus changes do that by
listening to focus_changed and scheduling a redraw.
This was causing unnecessary redraws in the clients, as could be
easily seen by changing focus on weston-flower.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Use a static assert to catch mismatch between implementation and
interface version. Fix window.c to not use XDG_SHELL_VERSION_CURRENT,
which will fail to catch version mismatches. The implementation version
must updated manually when the implementation is updated to use the new
interface.
Responsivenes is a per-client thing so we move the ping/pong functionality
to xdg_shell. Having this per-window was carries over from the EWMH
protocol, where the WM has no other way to do this. In wayland, the
compositor can directly ping the client that owns the surface.
This is used to figure out the size of "invisible" decorations, which we'll
use to better know the visible extents of the surface, which we can use for
constraining, titlebars, and more.
This is equivalent to WM_DELETE_WINDOW request under X11, or equivalent
to pressing the "close" button under CSD. Weston currently doesn't have
a compositor-side way to close the window, so no new code is needed on
its side.
When we set the fullscreen flag, we have to wait for the corresponding
configure event and then attach a buffer of that size to indicate
that we've successfully gone fullscreen/maximized.
Without this patch, we can schedule a redraw and go through with it after
setting maximize/fullscreen and end up attaching a buffer of the wrong size.
In practice, what happens is that pressing the maximize button triggers
setting maximized, but also triggers a redraw to paint the maxmize button.
Without this change, repainting the button triggers a repaint that attaches
the same size buffer immediately.
https://bugs.freedesktop.org/show_bug.cgi?id=71927
When resizing the terminal, it shows the grid size in the titlebar.
We reset the title next time we get an enter event. This patch makes
sure we only reset the title the first time we enter after a resize.
This reverts commit 4c1a11074af2c2221d50b0c35d2d0d883647bc15.
Use the new window_set_transient_for / window_get_transient_for
and xdg-shell support for this...
xdg_shell changes this around so that they are flags on the remote
object itself, not separate surface types. Move to a system where
we calculate the state from the flags ourselves and set the appropriate
wl_shell_surface type.
When we port to xdg_shell, we'll drop these flags and simply sync
on the client.
Transient windows, at least not as they are today, don't exist in
xdg_shell. Subsurfaces allow for specially placed surfaces relative
to a window, so use these instead.
The input region of the cursor surface is set to empty in
pointer_cursor_surface_configure(). Since during the commit process
this function is called before the pending input region is made
current, it empties surface->pending.input instead of surface->input.
But pointer_cursor_surface_configure() is also called from
pointer_set_cursor() in order to map the cursor even if there isn't a
subsequent attach and commit to the cursor surface. In that case,
surface->input is never emptied, since the configure function emptied
only the pending input region and there wasn't a commit that made it
effective.
Fix this by emptying both pending and current input regions. The latter
shouldn't cause problems since the surface can't have a role prior to
being assigned the cursor role, so it shouldn't be mapped in the first
place.
Also change toytoolkit so that it triggers the bug.
https://bugs.freedesktop.org/show_bug.cgi?id=73711
Fixes the following compiler warning:
simple-egl.c:434:36: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Handles potential out of memory situation by skipping the title update.
This fixes the following warning:
terminal.c: In function ‘resize_handler’:
terminal.c:851:11: warning: ignoring return value of ‘asprintf’,
declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
If we destroy a window with an active tooltip, we leave the tooltip
hanging around. Call tooltip destructor when destroying a window.
This fixes the stuck tooltip observed when unplugging a monitor with
an active tooltip on the panel.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72931
The keyboard is too chatty, make it use a dbg() function for logging
which defaults to disabled.
Also drop a noisy fprintf() in input_panel_configure().
strncat() into a newly allocated buffer isn't well-defined. I don't know
how this didn't crash all the time, getting blocks from malloc() with
a NUL in the first byte must be fairly common.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=71750
The subsurfaces example creates a subsurface widget and uses EGL to
render to it directly rather than using the cairo context from the
widget. In theory this shouldn't cause any problems because the westoy
window code lazily creates the cairo surface when an application
creates a cairo context. However commit fdca95c7 changed the behaviour
to force the lazy creation at the beginning of each surface redraw.
This ends up making the triangle surface get two attaches – one from
Cairo and one from the direct EGL.
It looks like it would be difficult to reinstate the lazy surface
creation behaviour whilst still maintaining the error handling for
surface creation because none of the redraw handlers in the example
clients are designed to cope with that. Instead, this patch adds an
explicit option on a widget to disable creating the Cairo surface and
the subsurface example now uses that.
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72854
This seems like a better name, and will not conflict if someone later
extends wl_surface with a request scaler_set (yeah, unlikely).
This code was written by Jonny Lamb, I just diffed his branches and made
a patch for Weston.
Cc: Jonny Lamb <jonny.lamb@collabora.co.uk>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>