]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: Allow xorg applications to start in fullscreen
authorARDiDo <90479315+ARDiDo@users.noreply.github.com>
Mon, 24 Jan 2022 22:57:35 +0000 (17:57 -0500)
committerARDiDo <90479315+ARDiDo@users.noreply.github.com>
Mon, 24 Jan 2022 22:57:35 +0000 (17:57 -0500)
src/xwayland.c

index 0f989e84a5bdac807eee16573147045fd506de45..623310ad91a336e0df511449e38c1fd775eb6ba9 100644 (file)
@@ -255,10 +255,12 @@ static void
 map(struct view *view)
 {
        view->mapped = true;
-       view->x = view->xwayland_surface->x;
-       view->y = view->xwayland_surface->y;
-       view->w = view->xwayland_surface->width;
-       view->h = view->xwayland_surface->height;
+       if (!view->maximized && !view->fullscreen) {
+               view->x = view->xwayland_surface->x;
+               view->y = view->xwayland_surface->y;
+               view->w = view->xwayland_surface->width;
+               view->h = view->xwayland_surface->height;
+       }
        view->surface = view->xwayland_surface->surface;
        view->ssd.enabled = want_deco(view);
 
@@ -268,22 +270,21 @@ map(struct view *view)
        }
 
        if (!view->been_mapped) {
-               view_maximize(view, false);
-               view_set_fullscreen(view, false, NULL);
-
                foreign_toplevel_handle_create(view);
 
-               struct wlr_box box =
-                       output_usable_area_from_cursor_coords(view->server);
-               view->x = box.x;
-               view->y = box.y;
-               view_center(view);
+               if (!view->maximized && !view->fullscreen) {
+                       struct wlr_box box =
+                               output_usable_area_from_cursor_coords(view->server);
+                       view->x = box.x;
+                       view->y = box.y;
+                       view_center(view);
+               }
 
                view_discover_output(view);
                view->been_mapped = true;
        }
 
-       if (view->ssd.enabled) {
+       if (view->ssd.enabled && !view->fullscreen && !view->maximized) {
                top_left_edge_boundary_check(view);
        }