xdg-shell: xdg_surface_set_output should only affect fullscreen.

dev
Rafael Antognolli 11 years ago committed by Kristian Høgsberg
parent 3c4e3f7cc7
commit 65f98d8c2f
  1. 8
      src/shell.c

@ -339,6 +339,7 @@ struct shell_surface {
struct weston_output *fullscreen_output; struct weston_output *fullscreen_output;
struct weston_output *output; struct weston_output *output;
struct weston_output *recommended_output;
struct wl_list link; struct wl_list link;
const struct weston_shell_client *client; const struct weston_shell_client *client;
@ -3295,8 +3296,7 @@ xdg_surface_set_output(struct wl_client *client,
else else
output = NULL; output = NULL;
if (!weston_surface_is_mapped(shsurf->surface)) shsurf->recommended_output = output;
shsurf->output = output;
} }
static void static void
@ -3313,7 +3313,7 @@ xdg_surface_set_fullscreen(struct wl_client *client,
shsurf->state_changed = true; shsurf->state_changed = true;
set_fullscreen(shsurf, set_fullscreen(shsurf,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0, shsurf->output); 0, shsurf->recommended_output);
} }
} }
@ -3358,7 +3358,7 @@ xdg_surface_set_maximized(struct wl_client *client,
if (!shsurf->next_state.maximized) { if (!shsurf->next_state.maximized) {
shsurf->next_state.maximized = true; shsurf->next_state.maximized = true;
shsurf->state_changed = true; shsurf->state_changed = true;
set_maximized(shsurf, shsurf->output); set_maximized(shsurf, NULL);
} }
} }

Loading…
Cancel
Save