Commit graph

221 commits

Author SHA1 Message Date
Johan Malm
2d312cd28b config: temporarily set xwaylandPersistence to 'yes' by default (#2414)
...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
2024-12-08 21:18:38 +00:00
Johan Malm
2348a5a87b labwc-config(5): add <xwaylandPersistence> to "core" section example 2024-12-08 21:18:38 +00:00
Johan Malm
8bad1d906c labwc-config(5): reflow some paragraphs to stay within 80 columns 2024-12-08 20:03:11 +01:00
Johan Malm
0b357a3bd4 labwc-config(5): add XML examples at start of some sections 2024-12-08 20:03:11 +01:00
Johan Malm
8e3d5784a3 docs: simplify description of shell wildcard patterns
...to align with glob(7) language

Reported-by: @vyivel
2024-12-01 20:17:04 +01:00
Johan Malm
2f8afb2376
keyboard: add window rule to send release-events (#2377)
...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
2024-11-26 20:02:36 +00:00
Jens Peters
7b5c76d573
osd: add desktop entry name option
Looks desktop entry name up from libsfdo.
2024-11-19 18:36:54 +01:00
tokyo4j
22eefa32a2 placement: set default placement policy to cascade 2024-11-14 09:21:01 +01:00
Johan Malm
a88c721979
environment: ignore env var assignments > 1 KiB (#2325)
...to guard against recursive constructs like FOO=$FOO:bar which would
grow on each reconfigure.

Add log message as well as a warning against this in the man page.
2024-11-10 20:40:51 +00:00
Simon Long
45a9bd95e7
Add mouse emulation for touch devices (#2277) 2024-10-29 19:22:01 +00:00
tokyo4j
915d638f8a doc: update default value of <theme><titlebar><layout> 2024-10-01 15:11:43 +09:00
tokyo4j
a745f91169 ssd: support window icons
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.
2024-09-25 18:04:09 +09:00
Johan Malm
cc26ac29b9
theme: finish titleLayout implementation (#2150)
Change Openbox style WLIMC syntax to `menu:iconify,max,close` as was
agreed when PR #2088 was merged.

    <titlebar>
      <layout>menu:iconify,max,close</layout>
      <showTitle>yes|on</showTitle>
    </titlebar>

Ref:
- https://github.com/labwc/labwc/pull/2088#issuecomment-2295730704
2024-09-23 19:17:12 +01:00
tokyo4j
1f1bdad087 interactive: allow moving horizontally/vertically maximized window
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.
2024-08-26 20:30:22 +02:00
Andrew J. Hesford
1bcaf8255f action: rename "omnipresent" button options for Openbox compatibility
- Mouse context "Omnipresent" -> "AllDesktops"
- Theme elements "window.*.button.omnipresent" -> "window.*.button.desk"
- Update documentation accordingly
2024-08-25 07:22:23 +02:00
Andrew J. Hesford
b7bccc8026 ssd: add optional omnipresent button 2024-08-24 05:42:38 +02:00
Andrew J. Hesford
186a07be9b ssd: add optional shade button 2024-08-24 05:42:38 +02:00
tokyo4j
b667107d1a input: move <scrollFactor> to <libinput> section
This allows per-device configuration of scroll factor (e.g. setting
different scroll factors for mice and touchpads).
2024-08-23 16:20:56 +09:00
Johan Malm
228a74ca48
Merge pull request #2088 from xi/titlelayout
theme: implement titleLayout
2024-08-21 19:20:34 +01:00
droc12345
8fda9968e6
menu: add title theme options (#2097)
Add theme options `menu.title.text.color` and `menu.title.text.justify`.

Add font place MenuHeader: `<font place="MenuHeader">`

Add `Oblique` font style

```
<theme>
  <font>
    <slant>Oblique</slant>
  </font>
</theme>
```
2024-08-21 18:27:07 +01:00
Tobias Bengfort
9a252249c9 ssd: add titleLayout setting 2024-08-20 23:04:10 +02:00
Jens Peters
f20b2c7632 input: apply tablet rotation before area transformation
This makes the behavior consistent with auto-rotation
as a result of output mapping.
2024-08-08 20:27:06 +01:00
Jens Peters
df12572f29 docs: clarify tablet rotation for mapped outputs 2024-08-08 20:27:06 +01:00
tokyo4j
670cc0f511 Rename <snapping><dragResistance> to <resistance><unSnapThreshold>
As we already have <resistance><{screen,window}EdgeStrength>,
<resistance> will be a better place for this setting.
2024-08-08 09:49:53 +09:00
Jens Peters
433a4509af
tearing: add fullscreen options (#1941)
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2024-08-06 21:23:10 +01:00
Johan Malm
19f0b769de labwc-config(5): minor refactor to fix pandoc rendering 2024-08-06 21:01:36 +02:00
Tobias Bengfort
116382fd89 keybind: implement allowWhenLocked
fixes #2034

see bc258a3be2/sway/sway.5.scd (L409)
2024-08-06 19:15:06 +02:00
Tobias Bengfort
6dd0d69889 docs: integrate onRelease into keybind 2024-08-06 19:15:06 +02:00
tokyo4j
c202d77c2d Add resistance when dragging tiled windows
Adds a config option <snapping><dragResistance> with default value 20.
This prevents tiled/maximized windows from being unintentionally untiled.
2024-08-02 23:40:26 +02:00
Christopher Snowhill
d033a2fbf6 output: allow tearing with atomic mode setting
Additionally, track errors and abandon the tearing allowance when it
cannot be set for two-seconds' worth of consecutive frames.
2024-07-20 08:09:00 -04:00
Andrew J. Hesford
14d9bbab90
xwayland: support xinitrc scripts to configure server on launch (#1963) 2024-07-20 09:40:11 +01:00
tokyo4j
46ec513630 view: implement cascade placement policy
Adds following settings:
<placement>
  <policy>cascade</policy>
  <cascadeOffset x="40" y="30" />
</placement>

"Cascade" policy places a new window at the center of the screen like
"center" policy, but possibly shifts its position to bottom-right so the
new window doesn't cover existing windows.

The algorithm is copied from KWin's implementation:
df9f8f8346/src/placement.cpp (L589)

Also added some helper functions to manipulate `wlr_box`.
2024-07-20 08:59:46 +01:00
Jens Peters
e26ec472b2 docs: add tablet tool section 2024-07-19 22:45:41 +01:00
Birger Schacht
3be20dc6c7 docs: fix typo in labwc-config.5.scd 2024-07-13 09:46:29 -04:00
Andrew J. Hesford
9153c22dab xwayland: allow persistence
Closes: #1958.
2024-07-04 05:19:19 +02:00
Jens Peters
b63c6a0fc2 action: add ToggleTabletMouseEmulation
Useful for switching between application-defined and
mapped tablet  pad buttons. Also for quickly troubleshooting
tablet behavior.
2024-06-18 22:13:28 +01:00
tokyo4j
bb1d0b4352 Implement <resize><drawContents>
<resize><drawContents>[yes|no] configures whether to let the clients
redraw its window content content while resizing.

When <resize><drawContents> is set to no, a multi-rect is shown to
indicate the geometry of the resized window.
2024-06-15 21:17:01 +01:00
Jens Peters
dc27be2471 docs: clarify tablet button mapping 2024-06-13 21:23:37 +01:00
Simon Long
84c222a84f Add onRelease option to <keybind>
...to make keybind actions fire on the release event rather then when the
key is first pressed. This is useful for binding actions to modifier keys
only. The most likely use-case for this is the binding of a Super key to a
menu, for example:

    <keybind key="Super_L" onRelease="yes">
      <action name="Execute" command="rofi -show drun"/>
    </keybind>

If another keybind is issued between the press and release, the on-release
keybind is cancelled.

Co-authored-by: @johanmalm
2024-06-09 21:15:58 +01:00
Yuri Nesterov
65f7499f1c wayland: add support for security-context-v1 2024-05-29 22:28:06 +01:00
Jens Peters
6a9564c18c docs: add mouse emulation section
Also clarify tablet button mapping restrictions.
2024-05-27 22:40:50 +02:00
Simon Long
6c7cdc246e Documentation 2024-05-19 22:17:04 +01:00
Simon Long
8ba066a1a5
Add screen magnifier
This adds a screen magnifier which can be controlled with the
`ZoomIn` / `ZoomOut` and `ToggleMagnify` actions.

It scales up part of the rendered framebuffer so the magnification
may end up looking blurry depending on the magnification scale.

PR #1774
2024-05-16 00:07:23 +02:00
tokyo4j
4b6efb7307 cursor: implement <menu><ignoreButtonReleasePeriod>
Addresses UX degradation introduced by commit 1d3ed457.

This prevents clicks with small movement with the intention of opening
the menu from unexpectedly closing the menu or selecting a menu item.
2024-05-01 19:08:07 +09:00
Tomi Ollila
96d5d80be2 docs: refer labwc-actions(5), not labwc-action(5) 2024-04-29 22:59:42 +02:00
Tomi Ollila
2e2cf54c00 docs: Fixed some typos, 80 column lines (where possible) 2024-04-26 22:15:39 +01:00
David Turner
ce0d2c2966
ssd: add window drop-shadows (#1648)
Add optional drop-shadows to windows using server-side decoration.
Shadows can be enabled/disabled rc.xml and their appearance configured
in themerc.  The default is no shadows to preserve current behaviour.

The shadows are drawn in fixed corner and edge buffers shared between
all windows, the edges are scaled to size depending on the size of each
window.  Two sets of buffers are used to give the different appearances
for active and inactive windows.  I use separate corner/edge buffers for
a few reasons:

- It avoids needing to store a separate large shadow buffer per window
- It avoids needing to redraw the shadows when the window is being
  resized
- Compositing the shadows onto the desktop should be faster as there are
  overall fewer pixels to blend, and scaling up the edge buffers only
  requires reading a tiny buffer which is then replicated.
2024-04-22 19:27:53 +01:00
tokyo4j
34290ef629 overlay: s/preview/overlay/
Replace "preview" in rc.xml and themerc with "overlay" since "preview" sounds
like it shows the window content.

Breaking changes are:
- `snapping.preview.*` in themerc is now replaced with `snapping.overlay`.
- `<snapping><preview>` in rc.xml is now replaced with `<snapping><overlay>`.
2024-04-22 19:22:23 +01:00
Consolatis
d67345564e window-rules: add ignoreConfigureRequest
This allows to ignore X11 client side configure requests
like positioning and resizing and can be used to fight
some X11 applications that persist to have their windows
spawn at specific places and sizes.

Fixes: #1446
2024-04-21 20:31:55 +01:00
Tobias Bengfort
858e1c65cf window-rules: implement type filter
Co-Authored-By: Grigory Kirillov <txgk@bk.ru>
2024-04-20 15:29:41 +02:00