[weston] xwayland: fix fullscreening

Submitted by Marek Chalupa on Oct. 29, 2014, 12:44 p.m.

Details

Message ID 1414586684-15627-1-git-send-email-mchqwerty@gmail.com
State Accepted
Commit e9fe46745302e4add242078d00408ef6ecae3fb6
Headers show

Not browsing as part of any series.

Commit Message

Marek Chalupa Oct. 29, 2014, 12:44 p.m.
set_fullscreen has been sending configure before changing the state
and xwayland windows added border to the fullscreen size.

This fixes the bug:
https://bugs.freedesktop.org/show_bug.cgi?id=83502

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
---
 desktop-shell/shell.c     | 4 ++--
 xwayland/window-manager.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 9fafb39..8e3f79d 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2929,10 +2929,10 @@  shell_interface_set_fullscreen(struct shell_surface *shsurf,
 			       struct weston_output *output)
 {
 	surface_clear_next_states(shsurf);
-	set_fullscreen(shsurf, method, framerate, output);
-
 	shsurf->next_state.fullscreen = true;
 	shsurf->state_changed = true;
+
+	set_fullscreen(shsurf, method, framerate, output);
 }
 
 static int
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 2902373..e7e5a7a 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2193,7 +2193,7 @@  send_configure(struct weston_surface *surface, int32_t width, int32_t height)
 	struct theme *t = window->wm->theme;
 	int vborder, hborder;
 
-	if (window->decorate) {
+	if (window->decorate && !window->fullscreen) {
 		hborder = 2 * t->width;
 		vborder = t->titlebar_height + t->width;
 	} else {

Comments

On Wed, 29 Oct 2014 13:44:44 +0100
Marek Chalupa <mchqwerty@gmail.com> wrote:

> set_fullscreen has been sending configure before changing the state
> and xwayland windows added border to the fullscreen size.
> 
> This fixes the bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=83502
> 
> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
> ---
>  desktop-shell/shell.c     | 4 ++--
>  xwayland/window-manager.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 9fafb39..8e3f79d 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -2929,10 +2929,10 @@ shell_interface_set_fullscreen(struct shell_surface *shsurf,
>  			       struct weston_output *output)
>  {
>  	surface_clear_next_states(shsurf);
> -	set_fullscreen(shsurf, method, framerate, output);
> -
>  	shsurf->next_state.fullscreen = true;
>  	shsurf->state_changed = true;
> +
> +	set_fullscreen(shsurf, method, framerate, output);
>  }
>  
>  static int
> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> index 2902373..e7e5a7a 100644
> --- a/xwayland/window-manager.c
> +++ b/xwayland/window-manager.c
> @@ -2193,7 +2193,7 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
>  	struct theme *t = window->wm->theme;
>  	int vborder, hborder;
>  
> -	if (window->decorate) {
> +	if (window->decorate && !window->fullscreen) {
>  		hborder = 2 * t->width;
>  		vborder = t->titlebar_height + t->width;
>  	} else {
> -- 
> 1.9.3

Hi, Marek.

This patch does fix the problem.

Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>

Thank you.
On Thu, 30 Oct 2014 23:14:30 +0900
Ryo Munakata <ryomnktml@gmail.com> wrote:

> On Wed, 29 Oct 2014 13:44:44 +0100
> Marek Chalupa <mchqwerty@gmail.com> wrote:
> 
> > set_fullscreen has been sending configure before changing the state
> > and xwayland windows added border to the fullscreen size.
> > 
> > This fixes the bug:
> > https://bugs.freedesktop.org/show_bug.cgi?id=83502
> > 
> > Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
> > ---
> >  desktop-shell/shell.c     | 4 ++--
> >  xwayland/window-manager.c | 2 +-
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> > index 9fafb39..8e3f79d 100644
> > --- a/desktop-shell/shell.c
> > +++ b/desktop-shell/shell.c
> > @@ -2929,10 +2929,10 @@ shell_interface_set_fullscreen(struct shell_surface *shsurf,
> >  			       struct weston_output *output)
> >  {
> >  	surface_clear_next_states(shsurf);
> > -	set_fullscreen(shsurf, method, framerate, output);
> > -
> >  	shsurf->next_state.fullscreen = true;
> >  	shsurf->state_changed = true;
> > +
> > +	set_fullscreen(shsurf, method, framerate, output);
> >  }
> >  
> >  static int
> > diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> > index 2902373..e7e5a7a 100644
> > --- a/xwayland/window-manager.c
> > +++ b/xwayland/window-manager.c
> > @@ -2193,7 +2193,7 @@ send_configure(struct weston_surface *surface, int32_t width, int32_t height)
> >  	struct theme *t = window->wm->theme;
> >  	int vborder, hborder;
> >  
> > -	if (window->decorate) {
> > +	if (window->decorate && !window->fullscreen) {
> >  		hborder = 2 * t->width;
> >  		vborder = t->titlebar_height + t->width;
> >  	} else {
> > -- 
> > 1.9.3
> 
> Hi, Marek.
> 
> This patch does fix the problem.
> 
> Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>

Nice, pushed.

Thanks,
pq