mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
xwayland: Fix size issue when starting VLC fullscreen
This commit is contained in:
parent
44a15b16ce
commit
09599861ac
2 changed files with 21 additions and 0 deletions
|
|
@ -106,6 +106,13 @@ struct xdg_toplevel_view {
|
||||||
struct wl_listener new_popup;
|
struct wl_listener new_popup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
view_is_floating(struct view *view)
|
||||||
|
{
|
||||||
|
return !view->fullscreen && !view->maximized && !view->tiled
|
||||||
|
&& !view->tiled_region;
|
||||||
|
}
|
||||||
|
|
||||||
void view_set_activated(struct view *view);
|
void view_set_activated(struct view *view);
|
||||||
void view_close(struct view *view);
|
void view_close(struct view *view);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -280,6 +280,20 @@ handle_request_configure(struct wl_listener *listener, void *data)
|
||||||
int height = event->height;
|
int height = event->height;
|
||||||
view_adjust_size(view, &width, &height);
|
view_adjust_size(view, &width, &height);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If a configure request is received while maximized/
|
||||||
|
* fullscreen/tiled, update the natural geometry only. This
|
||||||
|
* appears to be the desired behavior e.g. when starting VLC in
|
||||||
|
* fullscreen mode.
|
||||||
|
*/
|
||||||
|
if (!view_is_floating(view)) {
|
||||||
|
view->natural_geometry.x = event->x;
|
||||||
|
view->natural_geometry.y = event->y;
|
||||||
|
view->natural_geometry.width = width;
|
||||||
|
view->natural_geometry.height = height;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
configure(view, (struct wlr_box){event->x, event->y, width, height});
|
configure(view, (struct wlr_box){event->x, event->y, width, height});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue