mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-02 17:00:19 +00:00
mir: fix toggling between maximized and restored
This commit is contained in:
parent
e083eb42e9
commit
da14dbe4e5
@ -412,6 +412,7 @@ static void
|
|||||||
handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
||||||
{
|
{
|
||||||
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||||
|
MirSurfaceState state;
|
||||||
|
|
||||||
switch (mir_surface_event_get_attribute (event))
|
switch (mir_surface_event_get_attribute (event))
|
||||||
{
|
{
|
||||||
@ -419,8 +420,43 @@ handle_surface_event (GdkWindow *window, const MirSurfaceEvent *event)
|
|||||||
_gdk_mir_window_impl_set_surface_type (impl, mir_surface_event_get_attribute_value (event));
|
_gdk_mir_window_impl_set_surface_type (impl, mir_surface_event_get_attribute_value (event));
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_state:
|
case mir_surface_attrib_state:
|
||||||
_gdk_mir_window_impl_set_surface_state (impl, mir_surface_event_get_attribute_value (event));
|
state = mir_surface_event_get_attribute_value (event);
|
||||||
// FIXME: notify
|
_gdk_mir_window_impl_set_surface_state (impl, state);
|
||||||
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case mir_surface_state_restored:
|
||||||
|
case mir_surface_state_hidden:
|
||||||
|
gdk_synthesize_window_state (window,
|
||||||
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
|
GDK_WINDOW_STATE_MAXIMIZED |
|
||||||
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
|
0);
|
||||||
|
break;
|
||||||
|
case mir_surface_state_minimized:
|
||||||
|
gdk_synthesize_window_state (window,
|
||||||
|
GDK_WINDOW_STATE_MAXIMIZED |
|
||||||
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
|
GDK_WINDOW_STATE_ICONIFIED);
|
||||||
|
break;
|
||||||
|
case mir_surface_state_maximized:
|
||||||
|
case mir_surface_state_vertmaximized:
|
||||||
|
case mir_surface_state_horizmaximized:
|
||||||
|
gdk_synthesize_window_state (window,
|
||||||
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
|
GDK_WINDOW_STATE_FULLSCREEN,
|
||||||
|
GDK_WINDOW_STATE_MAXIMIZED);
|
||||||
|
break;
|
||||||
|
case mir_surface_state_fullscreen:
|
||||||
|
gdk_synthesize_window_state (window,
|
||||||
|
GDK_WINDOW_STATE_ICONIFIED |
|
||||||
|
GDK_WINDOW_STATE_MAXIMIZED,
|
||||||
|
GDK_WINDOW_STATE_FULLSCREEN);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case mir_surface_attrib_swapinterval:
|
case mir_surface_attrib_swapinterval:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user