mirror of
https://github.com/labwc/labwc.git
synced 2026-03-06 01:40:15 -05:00
view: account for base size in resize indicator
For views with a non-pixel size increment (e.g. X11 terminals), it's helpful to subtract the base size of the window (typically including menu bar, scrollbars, etc.) before computing the number of size increments (e.g. cells/characters). This way, the displayed size will exactly match the terminal grid (e.g. 80x25 or whatever). wlr_box isn't really the best fit for size hints, so let's define a struct view_size_hints and a nice view_get_size_hints() function, wrapping view->impl->get_size_hints(). This also seems like a great opportunity to make view_adjust_size() window-system-agnostic and eliminate xwayland_apply_size_hints().
This commit is contained in:
parent
48e0b3f6a6
commit
ce36cbac2d
5 changed files with 90 additions and 77 deletions
|
|
@ -48,8 +48,6 @@ void xwayland_view_create(struct server *server,
|
|||
|
||||
struct wlr_xwayland_surface *xwayland_surface_from_view(struct view *view);
|
||||
|
||||
bool xwayland_apply_size_hints(struct view *view, int *w, int *h);
|
||||
|
||||
void xwayland_server_init(struct server *server,
|
||||
struct wlr_compositor *compositor);
|
||||
void xwayland_server_finish(struct server *server);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue