This revises the changes done in 22d319c:
- Cancel defaulting to <dragLock>sticky<dragLock>. So labwc now disables
drag-lock by default, as libinput does.
- Update the options from [yes|no|sticky] to [timeout|no|yes] to
emphasize that the "sticky" mode (now "yes") is recommended when using
drag-lock.
...to enable/disable primary selection clipboard support. This only works
on launch.
The reason it is useful to be able to disable this is that some clients
(like browsers) support middle-button-click to start scrolling up/down.
With some clients can be disabled via
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false
...but for others (like chromium and electron based programs) a compositor
setting is required.
Fixes: #2815
Before this commit, all <field> entries inside different <fields> entires
were inserted to the same list. Suppose we have following configuration:
<windowSwitcher>
<fields><field content="title" width="100%" /></fields>
</windowSwitcher>
<windowSwitcher>
<fields><field content="identifier" width="100%" /></fields>
</windowSwitcher>
In this case, both two <field> entries were inserted to
rc.window_switcher.fields, making the OSD content overflow.
This commit fixes by clearing rc.window_switcher.fields when the parser
encounters <windowSwitcher><fields>.
Before this commit, when we have multiple <theme><titlebar><layout>
entries like below, duplicated button types can be inserted to
rc.title_buttons_{left,right} and the button could go outside of the
window:
<theme>
<titlebar><layout>icon:iconify,max,close</layout></titlebar>
<titlebar><layout>icon:iconify,max,close</layout></titlebar>
</theme>
This commit fixes by clearing those lists when the parser encounters
<theme><titlebar><layout>.
The default window switcher layout is updated from:
<windowSwitcher>
<fields>
<field content="type" width="25%" />
<field content="trimmed_identifier" width="25%" />
<field content="title" width="50%" />
</fields>
</windowSwitcher>
to:
<windowSwitcher>
<fields>
<field content="icon" width="5%" />
<field content="desktop_entry_name" width="30%" />
<field content="title" width="65%" />
</fields>
</windowSwitcher>
Only desktop entry name and title are shown when libsfdo is not linked.
Eliminate corner extents and instead use cursor position to map SSD
borders and extents to corner contexts, with a size configurable by the
<resize><cornerRange> parameter. This simplifies extent handling,
eliminates bugs in the detection of corner context, and allows users to
expand corner targets if they wish.
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit adds <theme><fallbackAppIcon> that configures the icon name
to be used when lookups for an application icon is failed. Its default
value is set as 'labwc' which shows our labwc logo.
Currently, labwc automatically enables outputs at startup and when new
outputs are connected. Make this behavior optional (but still enabled by
default).
With autoEnableOutputs disabled, tools such as kanshi can be used to
give finer-grained control of which outputs are enabled and when.
...to avoid surprises on Acer Aspire One laptops where the numeric
keyboard does not physically exist but "overlaps" the qwerty keyboard.
Reported-by: staryvyr on IRC
Note: We do not like changing defaults, but feel that there is a good
reason for this one.
This is a compile-time check, so it will be too conservative if somebody
updates wlroots after building labwc, but that is still better than the
alternatives.
...to avoid a bug that is present in wlroots <0.18.2 and which has the
potential to crash the compositor when performing a drag-and-drop action
at the same time as the XWayland server is shutting down.
This will be reverted when wlroots-0.18.2 can be linked with.
Related-to: #2371
...when options are specified as elements leading to hitting the assert()
in xstrdup().
Reproduce by using this rc.xml:
```
<?xml version="1.0"?>
<labwc_config>
<touch>
<deviceName>foo</deviceName>
<mapToOutput>bar</mapToOutput>
</touch>
</labwc_config>
```
It is likely that <touch> was only tested with options as attributes.
...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
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.
The default `titleLayout` is updated to `icon:iconify,max,close` which
replaces the window menu button with the window icon.
When the icon file is not found or could not be loaded, the window menu
icon as before is shown.
The icon theme can be selected with `<theme><icon>`.
This commit adds libsfdo as an optional dependency. `-Dicon=disabled` can
be passsed to `meson setup` command in order to disable window icon, in
which case the window icon is always replaced with a window menu button.
Applies drag resistance unidirectionally for horizontally/vertically
maximized windows, allowing them to be dragged without being untiled
immediately. When the distance of cursor movement orthogonal to the
maximized direction exceeds <resistance><unMaximizeThreshold>.
While dragging a horizontally/vertically maximized window, edge/region
snapping is disabled to prevent unintentional snapping and overlays.
This commit also includes some refactoring to simplify the logic.