shell: Set a surface as TOPLEVEL instead of the old surface types.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 5 Dec 2013 20:53:17 +0000 (18:53 -0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 5 Dec 2013 23:15:11 +0000 (15:15 -0800)
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.

desktop-shell/shell.c

index 7c202ea..f87da92 100644 (file)
@@ -2150,6 +2150,7 @@ set_transient(struct shell_surface *shsurf,
        shsurf->transient.flags = flags;
 
        shsurf->next_state.relative = true;
+       shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 
        /* The layer_link is updated in set_surface_type(),
         * called from configure. */
@@ -2183,7 +2184,7 @@ set_fullscreen(struct shell_surface *shsurf,
        shsurf->fullscreen.type = method;
        shsurf->fullscreen.framerate = framerate;
 
-       shsurf->next_type = shsurf->type;
+       shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 
        shsurf->client->send_configure(shsurf->surface, 0,
                                       shsurf->output->width,
@@ -2303,7 +2304,7 @@ set_maximized(struct shell_surface *shsurf,
                                       shsurf->output->width,
                                       shsurf->output->height - panel_height);
 
-       shsurf->next_type = shsurf->type;
+       shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 }
 
 static void