diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2012-09-10 15:55:53 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-09-14 13:54:28 -0400 |
commit | d7f282b84e1729f4692488a8af7e696e4d6b69d7 (patch) | |
tree | fa1066ca5015ad1ce5dd9242449b9da87b8416f2 /clients/simple-egl.c | |
parent | 231ba171c6af2e379c45e4ae997cb56573f87375 (diff) |
simple-egl: Set the opaque region if windowed and -o is passed
Since commit 6a615d262141de7cf094788203d9c044dfb9f08d [1], the opaque
region would be set only when running fullscreen. Having it set
properly for the windowed case is helpful to test the overlay path in
compositor-drm.
What this patch does is:
- reverts the above commit;
- remove the "if fullscreen make the window opaque" conditional, that
should have been removed when -o was introduced and was actually the
cause for the bug solved in [1];
- sets the opaque region when running fullscreen, regardless of the -o
switch.
[1] commit 6a615d262141de7cf094788203d9c044dfb9f08d
Author: Scott Moreau <oreaus@gmail.com>
Date: Thu Aug 30 14:44:16 2012 -0600
simple-egl: Only set alpha_size=0 when -o is passed.
v2: - Clarify in the commit message that this does not regress the bug
solved in [1].
- Use the correct sha1 for the reverted commit.
Diffstat (limited to 'clients/simple-egl.c')
-rw-r--r-- | clients/simple-egl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/clients/simple-egl.c b/clients/simple-egl.c index 808c2eea..a67ce2f8 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -282,3 +282,2 @@ toggle_fullscreen(struct window *window, int fullscreen) if (fullscreen) { - window->opaque = 1; wl_shell_surface_set_fullscreen(window->shell_surface, @@ -287,3 +286,2 @@ toggle_fullscreen(struct window *window, int fullscreen) } else { - window->opaque = 0; wl_shell_surface_set_toplevel(window->shell_surface); @@ -405,3 +403,3 @@ redraw(void *data, struct wl_callback *callback, uint32_t time) - if (window->opaque) { + if (window->opaque || window->fullscreen) { region = wl_compositor_create_region(window->display->compositor); @@ -596,3 +594,3 @@ main(int argc, char **argv) struct window window = { 0 }; - int i, opaque = 0; + int i; @@ -607,3 +605,3 @@ main(int argc, char **argv) else if (strcmp("-o", argv[i]) == 0) - opaque = 1; + window.opaque = 1; else if (strcmp("-h", argv[i]) == 0) @@ -623,6 +621,3 @@ main(int argc, char **argv) - if (window.fullscreen) - window.opaque = 1; - - init_egl(&display, opaque); + init_egl(&display, window.opaque); create_surface(&window); |