xwayland: Allow xorg applications to start in fullscreen

This commit is contained in:
ARDiDo 2022-01-24 17:57:35 -05:00
parent 8dd3dc3e3b
commit 7a3cd6549e

View file

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