...of modifiers which are part of keybinds. This supports clients (for
example blender) that want to see modifier-release-events even if they are
part of a keybinds.
Most clients (including those using Qt and GTK) are setup to not see these
modifier release events and actually misbehave if they do. For example
Firefox shows the menu bar if alt is pressed and then released, whereas if
only pressed (because the release is absorbed) nothing happens. So, if
Firefox saw bound modifier-release-events it would show the menu bar every
time the window-switcher is used with alt-tab.
<windowRules>
<windowRule identifier="blender" wantAbsorbedModifierReleaseEvents="yes"/>
</windowRules>
Issue #1507
Since GitHub runners now support hardware virtualization,
the maximal runtime of the FreeBSD runner is somewhere
around 3 to 6 minutes. It may still fail sometimes so
keep the timeout parameter around.
lab_data_buffer->logical_{width,height} are not the actual size of the
backing buffer, so wlr_buffer.{width,height} should be used when
duplicating it in get_cairo_surface_from_lab_data_buffer().
This mistake caused segfault when an icon file 1~2 times larger than
window.button.{width,height} is loaded, because the buffer for the raw
icon file is reused by setting lab_data_buffer->logical_{width,height}
with the size for display which is different from
wlr_buffer.{width,height} (see buffer_convert_cairo_surface_for_icon()),
and it is duplicated with get_cairo_surface_from_lab_data_buffer() for
hovered/rounded variants of titlebar button.
It was a cruft from my experiment of adding borders around titles.
It even caused an integer overflow because theme->menu_border_width can be
INT_MIN when menu_header_height is calculated.
This makes the colors of titlebar and window borders different, but will
let menu.border.color (which will be supported soon) inherit
window.active.border.color just like Openbox does, without making the menu
borders around a selected menu item invisible.
scaled_rect_buffer is an implementation of scaled_scene_buffer and shows
an auto-scaling bordered rectangle. This is intended for menu borders,
but can be also useful for other elements like window switcher items.
We will support rounded corners for scaled_rect_buffer in the future.
When the output is in the process of being enabled, but the new state
has not been committed yet, wlr_output->enabled is still false. So it's
not safe to assert that it's true in output_enable_adaptive_sync().
Fixes: 36e099fc93
"view: ensure output is usable before setting adaptive sync"
Implementers can define impl->equal() which compares two
scaled-scene-buffers so that buffers are not allocated for visually
duplicated scaled-scene-buffers.
Currently this mechanism isn't applied for scaled-font-buffers since we
haven't defined impl->equal() for it.
This allows implementations of the interface to share a single
wlr_buffer for multiple wlr_scene_buffer nodes and still make
the scaled-scene-buffer handle the buffer drops.
wlr_scene_buffer holds an implicit lock while using a wlr_buffer
and scaled-scene-buffer.c holds additional locks for as long as
a buffer is within its internal cache.
This should ensure that a shared wlr_buffer never gets actually
dropped even if wlr_buffer_drop() has been called by another
scaled-scene-buffer instance using the same wlr_buffer.
I missed that `scaled_font_buffer_update()` has `max_width` argument and
the subsequent calls to `scaled_font_buffer_set_max_width()` caused
unnecessary re-renderings.
An example is
```xml
<theme>
<name>Numix</name>
</theme>
<theme name="Numix" />
```
Including various other variants.
Also change all other `free(x); x = xstrdup(y)` calls to `xstrdup_replace()`.
Before this patch `keybind->keysyms` wasn't free'd when
- deduplicating keybinds
- removing keybinds due to empty action list
This patch creates a shared `keybind_destroy()` helper
which gets used in all cases where a keybind is destroyed.
This fixes use-after-free when there's only 1 desktop and
menu_hide_submenu() is called to delete "Workspaces" submenu in
client-menu before menu scenes are initialized.
As menu_create() and item_create() no longer initialize scenes after
76515316, menu->scene_tree and item->tree should be null-checked.
The deleted lines were dead code that didn't make any sense (even if it
were not dead, it should have recreated the parent of the hidden menu
rather than the hidden menu itself).
Commit 7651531 introduced a regression: `menu_update_scene()` which
re-creates a menu scene was called for all the menus when a pipemenu is
created, so the menus (parent of the pipemenu) were always moved to (0,0)
and hidden, and the pipemenu was incorrectly positioned.
This commit fixes it by calling `menu_update_scene()` only for the
pipemenu when it's created.
This commit separates the process of creating scene-trees of the menu
items into `{item,separator,title}_create_scene()`. This will make it
easier to draw richer menu designs like borders, paddings and rounded
corners.