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.
dev
Rafael Antognolli 11 years ago committed by Kristian Høgsberg
parent a98c2e17fd
commit db59f9a53f
  1. 5
      desktop-shell/shell.c

@ -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

Loading…
Cancel
Save