Commit graph

1608 commits

Author SHA1 Message Date
Johan Malm
4a31972b6f menu: print menu.xml nodenames
...when LABWC_DEBUG_MENU_NODENAMES is set
2023-07-04 06:01:47 +01:00
Ph42oN
c0c40e1432 action: disable MoveRelative for fullscreen and unmaximize 2023-07-03 16:42:43 +01:00
Ph42oN
934bf1c5b3 view: resize_relative disable for fullscreen and maximized and set untiled 2023-07-03 16:42:43 +01:00
John Lindgren
370cdc80e0 view: add client_request flag to view->impl->unmap()
This makes explicit the subtle behavioral difference between
xwayland_view_unmap() and handle_unmap().

With this change, the XDG and XWayland versions of handle_map/unmap()
are now identical, which will make further refactoring possible.
2023-07-01 23:07:39 +02:00
Johan Malm
b200dd2e7b osd: use theme->osd_border_width for focused item 2023-06-29 19:14:08 +01:00
Johan Malm
df53c28a0f theme: add window-switcher width/padding
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue #879
2023-06-29 19:14:08 +01:00
Johan Malm
11ff820105 osd: use theme->osd_border_width consistently 2023-06-29 19:14:08 +01:00
stefonarch
04ccedbc7e Some formatting 2023-06-27 21:11:20 +01:00
Ph42oN
ea623daaee action: add ResizeRelative 2023-06-27 20:59:33 +02:00
Ph42oN
e40159470b add MoveRelative to man page and use view->pending 2023-06-27 20:59:33 +02:00
Julius Yli-Suomu
c17bf68176 add MoveRelative 2023-06-26 19:37:58 +01:00
Johan Malm
f325335e16 session.c: unconstify build_path() return value 2023-06-26 06:30:33 +01:00
Johan Malm
f4f35a9dff common/string-helpers.c: add strdup_printf() 2023-06-26 06:30:33 +01:00
Johan Malm
41de529fff window-rules: support matchOnce attribute
...allowing a rule to be applied to only the first window matching a
particular criteria. For example, the following can be used to apply a
window rule to lxqt-panel but not its configuration window with the same
app_id:

    <windowRules>
      <windowRule identifier="lxqt-panel" matchOnce="true">
        <skipTaskbar>yes</skipTaskbar>
        <action name="MoveTo" x="0" y="0" />
        <action name="ToggleAlwaysOnTop"/>
      </windowRule>
    </windowRules>
2023-06-26 06:04:07 +01:00
Johan Malm
f6c3a3d7c3 action: add MoveTo 2023-06-26 06:04:07 +01:00
Johan Malm
3a6a04215c action: support arguments of int type 2023-06-26 06:04:07 +01:00
Johan Malm
4a531daef8 config: support <margin top="" bottom="" left="" right="" output="" /> 2023-06-26 06:04:07 +01:00
Johan Malm
3a9dcd54a7 Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00
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