Commit Graph

317 Commits

Author SHA1 Message Date
Ander Conselvan de Oliveira
fc63fddcee shell: Reset fullscreen and maximized state on output unplug
When a view is moved to another output because its current output was
unplugged, remove the fullscreen and maximized state.
2013-12-16 17:23:08 -08:00
Zhang, Xiong Y
31236932a1 desktop-shell: Invalidate saved position when output is destroyed
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>
2013-12-16 17:23:08 -08:00
Giulio Camuffo
1aaf3e42e2 sdk: make C++11 plugins build again
compositor.h must not define a 'static_assert' macro, since that
conflicts with the new 'static_assert' in the standard and breaks
the build.
2013-12-09 16:20:48 -08:00
Jasper St. Pierre
8f180d44f5 shell: Fix set_transient_for with a NULL parent 2013-12-09 11:34:09 -08:00
Kristian Høgsberg
8d344a0548 shell: Make sure the shell implementation and protocol versions match 2013-12-08 22:27:11 -08:00
Kristian Høgsberg
c8f8dd894e desktop-shell: Drop next_type from shell_surface
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.
2013-12-05 23:20:44 -08:00
Kristian Høgsberg
4804a301db shell: Put xwayland surface at the top of the fullscreen layer
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.
2013-12-05 22:43:03 -08:00
Kristian Høgsberg
41fbf6f7fd desktop-shell: Make set_toplevel() clear surface states
This is used from wl_shell and xwayland and we need to make sure
xwayland also gets this behavior.
2013-12-05 22:31:25 -08:00
Kristian Høgsberg
e960b3f012 desktop-shell: Set fullscreen flags in common code path
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.
2013-12-05 22:04:42 -08:00
Kristian Høgsberg
c2745b14f0 desktop-shell: Set maximized flags in common code path
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().
2013-12-05 22:00:40 -08:00
Rafael Antognolli
5031cbe7b4 shell: Don't try to switch to a NULL shell surface.
Fixes the crash from alt+tab when there's a fullscreen surface.
2013-12-05 15:37:29 -08:00
Rafael Antognolli
db59f9a53f shell: Set a surface as TOPLEVEL instead of the old surface types.
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.
2013-12-05 15:15:11 -08:00
Rafael Antognolli
44a3162eea shell: Add missing break to a case statement inside set_surface_type.
This should fix the surface not going back to its original position
after unsetting fullscreen or maximized states.

https://bugs.freedesktop.org/show_bug.cgi?id=72321
2013-12-05 12:02:36 -08:00
Rafael Antognolli
ba5d2d76af shell: Fix activate logic on surface map.
It should activate the newly mapped surface if not locked.
2013-12-04 11:55:03 -08:00
Kristian Høgsberg
677a5f5ac2 desktop-shell: Split out input-panel code 2013-12-04 11:03:24 -08:00
Kristian Høgsberg
1ef231377c desktop-shell: Split out exposay immplementation 2013-12-04 10:20:02 -08:00
Kristian Høgsberg
19d1e6b185 desktop-shell: Move to new desktop-shell subdirectory 2013-12-04 10:20:02 -08:00