shell: Center window in fullscreen if needed
authorAlexander Larsson <alexl@redhat.com>
Tue, 28 May 2013 14:23:40 +0000 (16:23 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 28 May 2013 21:22:04 +0000 (17:22 -0400)
If modeset fails With DRIVER method, and always with FILL method
we want to center the window.

src/shell.c

index 399ca69..9d99201 100644 (file)
@@ -1829,11 +1829,14 @@ shell_configure_fullscreen(struct shell_surface *shsurf)
                                                         output->width,
                                                         output->height);
                                break;
-                       } else
+                       } else {
                                restore_output_mode(output);
+                               center_on_output(surface, output);
+                       }
                }
                break;
        case WL_SHELL_SURFACE_FULLSCREEN_METHOD_FILL:
+               center_on_output(surface, output);
                break;
        default:
                break;