Set the initial geometry of maximized/fullscreen views before
actually mapping them, so that they can do their initial layout and
drawing with the correct geometry. This avoids visual glitches and
also avoids undesired layout changes with some apps (e.g. HomeBank).
Fixes: #1320
v2: ensure valid geometry for unmanaged->managed case
Chase 8c5b23e592
Pango rounds glyph position and widths to nearest integer, which leads to
font dimensions jumping around when rendering with a scale, causing text
geometry to jump around when changing scale.
Disable this rounding to make the geometry stable.
...such as the one in the example below:
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<menu id="root-menu" label="obmenu-generator" execute="obmenu-generator"/>
</openbox_menu>
We should consider supporting this construct in future.
Reported-by: cry0xen via IRC
wlroots < 0.17 didn't allow to reliably check the source surface of
an xdg activation request as it reset the surface to NULL when it
was destroyed before the token was used. This happens regularly for
notifications for example. Thus we treated the token as valid even
without checking for the source surface.
wlroots 0.17 added a new_token signal where we can attach information
to the existing token which we can then use when evaluating activation
requests. This patch implements that check.
I forgot to set session_lock_manager->lock, so it was always NULL.
This barely worked, but allowed multiple session-locks and conflicted
with comments in session-lock.h.
Before this patch, we were leaking memory [0] because the
shadow implementation did not free the ssd_parts on destruction.
There was also no check if shadows were actually enabled via
rc.xml or not so this also impacted people who were not using
shadows but were not setting the shadow size via their theme to 0.
[0] 44 bytes per ssd_part * 8 parts * 2 states == 704 bytes per
view closed. Note that Reconfigure also re-creates the SSD, thus
we were also leaking 704 bytes * nr_views per Reconfigure.
See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3514
which added support on the wlroots side.
We now re-run popup positioning (for both xdg-shell and layer-shell
popups) when the "reposition" event is received. This allows popups that
change size (such as qmpanel's applications menu) to be positioned
correctly.
xdg-shell v3 also gives the compositor some additional "hints" for popup
positioning (reactive, parent_size, and parent_configure_serial) which
are available but we don't make use of currently.
Gamma changes take another code path and thus did not
render the magnifier. This patch consalidates both
code paths and therefore also renders the magnifier on
gamma changes.
Fixes: #1905
Thonny (Python IDE made with Tk) may set the window geometry to 1x1 and
maximizes the window before mapping. This set `view->natural_geometry`
to 1x1, so labwc tried to restore the window geometry to it on
unmaximize, causing validation errors in `ssd_update_geometry()` as its
width and height are smaller than `LAB_MIN_VIEW_{WIDTH,HEIGHT}`.
This commit fixes it by not allowing geometries smaller than
`LAB_MIN_VIEW_{WIDTH,HEIGHT}` in `view->natural_geometry`.