Commit graph

1690 commits

Author SHA1 Message Date
Johan Malm
16bf67a8cd view: add minimize method
...and call wlr_xwayland_surface_set_minimized() for xwayland surfaces on
(un)minimize.

Fixes: #958
2023-06-25 16:25:17 +01:00
Sachin Bhat
945928a8f6 config: support <desktops number=""> update documentation 2023-06-25 10:31:13 +01:00
Sachin Bhat
dbe4a52354 config: support <desktops number=""> 2023-06-25 10:31:13 +01:00
Sachin Bhat
18eb7a26c0 config: support <desktops number=> 2023-06-25 10:31:13 +01:00
Sachin Bhat
629bc9c978 config: support <desktops number=> update documentation 2023-06-25 10:31:13 +01:00
Sachin Bhat
1e33734543 config: support <desktops number=>
Documentation updated at  and
2023-06-25 10:31:13 +01:00
Sachin Bhat
9bb4f44688 config: support <desktops number=""> 2023-06-25 10:31:13 +01:00
Standreas
e82e557d56 docs/rc.xml.all: fix mousebind button casing 2023-06-14 17:21:31 +02:00
Johan Malm
468470182d config: fix bug with default scroll mousebind
Specify attribute name when adding default mousebind actions.

This is required because in src/action.c action GoToDesktop requires an
argument with key 'to' and does not accept `action_get_first_arg()`
because the action supports other optional attributes so we could not
guarantee that 'to' is the first one.

Fixes: #948
2023-06-11 21:05:26 +01:00
Johan Malm
3bd441caa0 dnd: refocus surface under cursor on drag-destroy
Keyboard focus is not changed during drag, so we need to refocus the
surface under the cursor and the end of a drag-and-drop operation.

Fixes issue #939
2023-05-28 22:17:29 +01:00
Tomi Ollila
f817a9e56a docs: fix some typos
Between, output, rounded and focused.

Added one inconsistently missing trailing period.

Inserted newline before last word in one line in
labwc-actions.5.scd in order to keep that line from
passing 80-column boundary.
2023-05-27 14:12:22 +01:00
Johan Malm
a6f0fc9c62 window-rules: add skipTaskbar and skipWindowSwitcher 2023-05-22 20:37:49 +01:00
Johan Malm
15cd093f2e action: add ToggleAlwaysOnBottom 2023-05-22 20:37:49 +01:00
Johan Malm
78aec7945c xdg-popup: render above always-on-top 2023-05-22 20:37:49 +01:00
Tomi Ollila
f2c3f83041 action: support {Go,Send}ToDesktop 'wrap' option
Make wrap 'true' by default for both GoToDesktop and SendToDesktop,
in order to default to the current behaviour, and to stay consistent
with Openbox behaviour.
2023-05-21 22:32:07 +02:00
Consolatis
44645d06c2 src/output.c: destroy workspace OSD on output destroy 2023-05-17 13:56:11 +02:00
Consolatis
f2aa030aac src/workspaces.c: do not render OSD on disabled outputs
Fixes #914
2023-05-17 13:56:11 +02:00
Consolatis
ab8ab3dd86 src/action.c: validate action type when assigning arguments
Before this patch it was possible to assign an argument with an
existing name to an action that didn't support the given argument.
An example of this is using `direction` for `GoToDesktop`.

This patch now only creates action arguments that are actually
defined for the given action type and logs an error for
unsupported arguments.

The commit also makes sure to always supply the argument name.
This will reduce required checks in other parts of the codebase
in future commits.

Partly fixes: #894
2023-05-15 22:32:33 +02:00
Tomi Ollila
7ad5200f2e includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers.

Converted from __LABWC_ in 35 include/ files.
Converted from __LAB_ in 5 include/ files.
Added LABWC prefix to 3 include/ files.
Added include guards to 3 include/ files.

The double underscores were removed since according to C standard
those "are always reserved for any use".
2023-05-13 22:29:21 +01:00
Consolatis
dbad5fc483 src/config/rcxml.c: move region validation into the validate() hook 2023-05-12 19:30:59 +02:00
Johan Malm
2df13933ca labwc-config(5): describe element/attribute-agnostic XML parsing 2023-05-10 22:12:02 +01:00
Johan Malm
d37e705548 window-rules: support title criteria
Example config:

    <windowRules>
      <windowRule identifier="foot" title="max">
        <action name="Maximize"/>
      </windowRule>
    </windowRules>

Observe that:

- `foot -T foo` starts maximized
- `xterm -T foo` starts normal
2023-05-10 21:21:34 +01:00
Johan Malm
63db731cf4 build: bump version to 0.6.3 2023-05-08 07:29:12 +01:00
Johan Malm
92a79073bc NEWS.md: add notes on 0.6.3 2023-05-08 07:24:46 +01:00
John Lindgren
5b962d5437 xwayland: Add mapped argument to xwayland_view_create()
This is a trivial cleanup to make xwayland_view_create() symmetrical with
xwayland_unmanaged_create(), and avoid the need to access view->impl from
xwayland-unmanaged.c.

The return value of xwayland_view_create() is no longer user, so return void.

No functional change.
2023-05-06 12:12:13 -04:00
Consolatis
9a9e20d2b0 followMouse: add followMouseRequiresMovement
This implements the same config option as `underMouse` in Openbox.

Fixes #862
2023-05-06 14:13:20 +01:00
Johan Malm
bdd3849138 match.c: fix g_utf8_casefold() memory leak
Reported-by: @jlindgren90
2023-05-06 12:08:31 +01:00
Johan Malm
d609c9e3f9 Support window-rules
Two types of window rules are supported, actions and properties. They are
defined as shown below.

    <windowRules>

      <!-- Action -->
      <windowRule identifier="some-application">
        <action name="Maximize"/>
      </windowRule>

      <!-- Property -->
      <windowRule identifier="foo*" serverDecoration="yes|no"/>

    </windowRules>

Rules are applied if windows match the criteria defined by the
'identifier' attribute which relates to app_id for native Wayland windows
and WM_CLASS for XWayland clients.

Matching against patterns with '*' (wildcard) and '?' (joker) is
supported.

Add 'serverDecoration' property.
2023-05-04 22:09:55 +01:00
Johan Malm
d0aafb684f action: add Maximize 2023-05-04 22:09:55 +01:00
Johan Malm
71f5ac8323 Add common/match.c with match_glob() from theme.c
...and make it fully case-insensitive in preparation for window-rules.
2023-05-04 22:09:55 +01:00
Consolatis
e1725e17b2 src/output.c: fix adaptive sync
Fixes #642

Reported-by: @heroin-moose
Tested-by: @heroin-moose
2023-04-30 15:12:10 +01:00
Johan Malm
ac1899ada5 parse-bool.c: add helpers to set bool/int iff valid boolean 2023-04-28 20:48:39 +01:00
Consolatis
ed8999456a Ignore SIGPIPE
Prevent wayland clients that request the X11 clipboard but closing
their read fd prematurely to crash labwc because of the unhandled
SIGPIPE signal. It is caused by wlroots trying to write the X11
clipboard data to the closed fd of the wayland client.

See https://github.com/labwc/labwc/issues/890#issuecomment-1524962995
for a reproducer involving xclip and wl-paste | head -c 1.

Fixes #890
Reported-by: @FuzzyQuills
2023-04-27 18:21:24 +01:00
Consus
957dd43af2 output: Make the session lock layer the topmost
Make sure that only the session lock layer is visible to a user. Fixes
the issue with mako notifications being rendered above the swaylock
window.
2023-04-27 18:17:44 +02:00
Johan Malm
86cb62ed12 action: gracefully handle argument without key
Fixes: issue #894
2023-04-26 15:11:31 +01:00
Johan Malm
fa50149525 common/parse-bool.c: make parse_bool() generic
...to avoid multiple versions of a boolean-parser.

- Optionally take a default value
- Return -1 on error
- Rename get-bool.c to parse-bool.c
2023-04-26 15:11:31 +01:00
Johan Malm
473f0aacbd action: add get_arg_value_{str,bool} to simplify multi-arg handling 2023-04-26 15:11:31 +01:00
Johan Malm
440f7bd760 action: make action_arg_add_bool() static 2023-04-26 15:11:31 +01:00
Marcin Puc
839179aafd Add Polish translation 2023-04-24 21:37:39 +01:00
Johan Malm
09c1cdd2dc osd: set field width to ellipsize 2023-04-24 04:25:52 +02:00
Johan Malm
693c5bd937 config: move cycle_* bools to window_switcher struct 2023-04-21 16:05:48 +01:00
Johan Malm
0f37c04df0 config: support window switcher field definitions
<windowSwitcher>
  <fields>
    <field content="type" width="25%" />
    <field content="app_id" width="25%" />
    <field content="title" width="50%" />
  </fields>
</windowSwitcher>

Relates to issues #852 #855 #879
2023-04-21 16:05:48 +01:00
Johan Malm
36849eb7ef config: make <windowSwitcher> a toplevel element
...rather than a child of <core>
2023-04-21 16:05:48 +01:00
Johan Malm
5744bba849 xwayland: validate PID before activating unmanaged surface
Check that an unmanaged surface trying to grab focus is actually a child
of the topmost mapped view.
2023-04-21 15:59:36 +01:00
Johan Malm
64d62a91b6 xwayland: handle unmanaged activate requests 2023-04-19 14:30:54 +01:00
Johan Malm
26e6828e67 xwayland: handle unmanaged override-redirect requests
Fixes: issue #874
2023-04-19 14:30:54 +01:00
Johan Malm
9d08a452a3 xwayland: split out xwayland_view constructor
...and make it public in preparation for supporting override-redirect
requests from unmanaged xwayland surfaces.
2023-04-19 14:30:54 +01:00
Flrian
130da3c803 po: clean up language files
Changed entries in "Language" field to language code
Added language names to "Language Team"
Removed example email address
Fixed author names in Copyright section
2023-04-17 17:12:14 +01:00
umksan
5bf594af3d Update es.po
Small grammatical error
2023-04-16 17:13:03 +01:00
May Mantari
6aeed55622 Add Indonesia translation 2023-04-15 22:27:39 +01:00