diff options
author | Ander Conselvan de Oliveira <[email protected]> | 2012-11-30 17:41:02 +0200 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2012-11-30 11:08:04 -0500 |
commit | ca3ed3e024864e91ca3cccc59fb96950e1d079b5 (patch) | |
tree | b93557df91947ab72cff269c8d6c3800fc8500cf /src/egl/wayland/wayland-egl/wayland-egl-priv.h | |
parent | b5c53245afcb35632cc662ff7f84a578eba864c3 (diff) |
egl/wayland: Don't invalidate drawable on swap buffers
We used to invalidate the drawable after a call to eglSwapBuffers(),
so that a wl_egl_window_resize() would take effect for the next frame.
However, that leads to calling dri2_get_buffers() when eglMakeCurrent()
is called with the current context and surface, and a later call to
wl_egl_window_resize() would not take effect until the next buffer
swap.
Instead, add a callback from wl_egl_window_resize() back to the wayland
egl platform, and invalidate the drawable only when it is resized.
This solves a bug on wayland clients when going back to windowed mode
from fullscreen when clicking a pop up menu, where the window size
after this would be the fullscreen size.
Note: this is a candidate for stable branches.
CC: [email protected]
Diffstat (limited to 'src/egl/wayland/wayland-egl/wayland-egl-priv.h')
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl-priv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h index bdbf32a1689..da25be9f710 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h +++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h @@ -24,6 +24,9 @@ struct wl_egl_window { int attached_width; int attached_height; + + void *private; + void (*resize_callback)(struct wl_egl_window *, void *); }; #ifdef __cplusplus |