Set up X windows that are transient for another window as transient
surfaces in shell.c. This keeps the transient windows on top of their
parent as windows are raised, lowered for fullscreened.
https://bugs.freedesktop.org/show_bug.cgi?id=69443
If a surface is not on any output, scheduling a repaint for it is a no-op.
weston_view_schedule_repaint() schedules repaints for all outputs that
overlap with the surface extents, but if the surface is completely
outside all outputs nothing will be scheduled. Fix this for now by starting
the slide slightly into the output.
The input-panel codes tries to see determine if a buffer has not yet
been attached (or a NULL buffer has been attached), and doesn't map
the input panel surface yet in that case. However, it test for
buffer_ref being NULL, which can happen for other reasons. The right
test is to see if surface->width is 0, which means that either a
buffer hasn't yet been attached or a NULL buffer has been attached.
https://bugs.freedesktop.org/show_bug.cgi?id=72519
If we're not currently showing the input panels, we still need to set the
panel position so that it's set when we later need to show them. This fixes
the initial flicker of the input panel in the wrong position when we first
show it.
If we don't have a background image from the desktop-shell client or the
pointer for some other reason doesn't have a focus we trigger a
segfault as we try to deref the seat->pointer->focus NULL pointer.
https://bugs.freedesktop.org/show_bug.cgi?id=73066
This is still fairly unstable, causes lockups with fullscreen and exposay,
leaves small preview surfaces on-screen if used on the same modifier as
mod-tab. We also only need on mod-tab implementation so lets see if we
can consolidate the current and this alt-tab implementation in 1.5.
https://bugs.freedesktop.org/show_bug.cgi?id=72610
Popup windows are relative to a plain wl_surface, so that custom surfaces
can have popups. This used for the desktop-shell panel for example. Also,
popups should be immediately on top of their parent surface, as they
typically represent an extension of an UI element in the parent surface
such as a combo box or menu.
This reverts commit da704d97fa.
Conflicts:
desktop-shell/shell.c
https://bugs.freedesktop.org/show_bug.cgi?id=72547
If we don't mark the state as changed, we don't copy over next_state to
state and we fail to treat the surface as a transient. In particular,
we give it a random intial position instead of mapping it at the given
parent relative position.
https://bugs.freedesktop.org/show_bug.cgi?id=72532
Set the internal pointer for the client to NULL. This fixes a
segmentation fault at shutdown, where the shell would hang up before
and cause libwayland to call wl_client_destroy(). When the shell was
destroyed later, another call to wl_client_destroy() would cause the
crash.
https://bugs.freedesktop.org/show_bug.cgi?id=72550
Surfaces that are created by clients get their size automatically updated
by the attach/commit. Surfaces created directly by shells (such as black
surfaces) sometimes need to be manually resized. This function allows you
to do that while being somewhat less messy than messing with the internals
of weston_surface manually.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
If the saved position for a fullscreen or maximized output view is in an
output that has been unplugged, the coordinates don't make sense
anymore. In that case, invalidate them and use the initial position
algorithm when changing them back to the basic state.
Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
The surface type now no longer changes and we track pending state changes in
next_state. Instead of testing type != next_type to detect changes in
state, we just look at state_changed.
An xwayland surface corresponds to a override-redirect window under X,
which is typically a menu or a popup window. They typically appear
with a keyboard and mouse grab and by nature of being override-redirect
these window can appear anywhere on screen and in the stack.
We need to resort to heuristics to decide where to place the
override-redirect in our surface stack, and for now we'll just put it on
top of everything. That's going to be correct for almost all cases of
clicking to open a menu, but we can revisit and refine if we run into
a case that needs better handling.
Just as for set_maximized() we can move the setting of the fullscreen and
state_changed flags into the common set_fullscreen() function. This
function is also used from the xwayland wm to set fullscreen windows, and
with this change that now works again.
We can set the maximized and state_changed flags in set_maximized(),
which is shared between shell_surface_set_maximized() and
xdg_surface_set_maximized().
Since internally there's no more SHELL_SURFACE_FULLSCREEN and
SHELL_SURFACE_MAXIMIZED, the surface must be set to
SHELL_SURFACE_TOPLEVEL on the respective functions.
This fixes the bug when clients start already in fullscreen mode. In
that case, they aren't set first to toplevel, and then change to
fullscreen. They are set as fullscreen directly, not receiving the
SHELL_SURFACE_TOPLEVEL type on the set_fullscreen function.