compositor: Move fullscreen_output to shell_surface

dev
Kristian Høgsberg 14 years ago
parent 323ee04505
commit 1cbf3262dd
  1. 1
      src/compositor.c
  2. 1
      src/compositor.h
  3. 11
      src/shell.c

@ -193,7 +193,6 @@ weston_surface_create(struct weston_compositor *compositor)
surface->image = EGL_NO_IMAGE_KHR; surface->image = EGL_NO_IMAGE_KHR;
surface->alpha = 255; surface->alpha = 255;
surface->fullscreen_output = NULL;
surface->buffer = NULL; surface->buffer = NULL;
surface->output = NULL; surface->output = NULL;

@ -285,7 +285,6 @@ struct weston_surface {
*/ */
struct weston_output *output; struct weston_output *output;
struct weston_output *fullscreen_output;
struct wl_list frame_callback_list; struct wl_list frame_callback_list;
EGLImageKHR image; EGLImageKHR image;

@ -108,6 +108,7 @@ struct shell_surface {
int32_t initial_up; int32_t initial_up;
} popup; } popup;
struct weston_output *fullscreen_output;
struct weston_output *output; struct weston_output *output;
struct wl_list link; struct wl_list link;
}; };
@ -355,7 +356,7 @@ reset_shell_surface_type(struct shell_surface *surface)
weston_surface_set_position(surface->surface, weston_surface_set_position(surface->surface,
surface->saved_x, surface->saved_x,
surface->saved_y); surface->saved_y);
surface->surface->fullscreen_output = NULL; surface->fullscreen_output = NULL;
break; break;
case SHELL_SURFACE_MAXIMIZED: case SHELL_SURFACE_MAXIMIZED:
surface->output = get_default_output(surface->surface->compositor); surface->output = get_default_output(surface->surface->compositor);
@ -503,7 +504,7 @@ shell_surface_set_fullscreen(struct wl_client *client,
shsurf->saved_x = es->geometry.x; shsurf->saved_x = es->geometry.x;
shsurf->saved_y = es->geometry.y; shsurf->saved_y = es->geometry.y;
es->fullscreen_output = output; shsurf->fullscreen_output = output;
shsurf->type = SHELL_SURFACE_FULLSCREEN; shsurf->type = SHELL_SURFACE_FULLSCREEN;
wl_resource_post_event(resource, wl_resource_post_event(resource,
@ -1374,7 +1375,7 @@ map(struct weston_shell *base, struct weston_surface *surface,
break; break;
case SHELL_SURFACE_SCREENSAVER: case SHELL_SURFACE_SCREENSAVER:
case SHELL_SURFACE_FULLSCREEN: case SHELL_SURFACE_FULLSCREEN:
center_on_output(surface, surface->fullscreen_output); center_on_output(surface, shsurf->fullscreen_output);
break; break;
case SHELL_SURFACE_MAXIMIZED: case SHELL_SURFACE_MAXIMIZED:
/*use surface configure to set the geometry*/ /*use surface configure to set the geometry*/
@ -1486,7 +1487,7 @@ configure(struct weston_shell *base, struct weston_surface *surface,
switch (surface_type) { switch (surface_type) {
case SHELL_SURFACE_SCREENSAVER: case SHELL_SURFACE_SCREENSAVER:
case SHELL_SURFACE_FULLSCREEN: case SHELL_SURFACE_FULLSCREEN:
center_on_output(surface, surface->fullscreen_output); center_on_output(surface, shsurf->fullscreen_output);
break; break;
case SHELL_SURFACE_MAXIMIZED: case SHELL_SURFACE_MAXIMIZED:
/*setting x, y and using configure to change that geometry*/ /*setting x, y and using configure to change that geometry*/
@ -1612,7 +1613,7 @@ screensaver_set_surface(struct wl_client *client,
surface->type = SHELL_SURFACE_SCREENSAVER; surface->type = SHELL_SURFACE_SCREENSAVER;
surface->surface->fullscreen_output = output; surface->fullscreen_output = output;
surface->output = output; surface->output = output;
wl_list_insert(shell->screensaver.surfaces.prev, &surface->link); wl_list_insert(shell->screensaver.surfaces.prev, &surface->link);
} }

Loading…
Cancel
Save