]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
2 years agoxwayland: add explanatory comment on WM_HINTS.input
John Lindgren [Wed, 27 Sep 2023 23:19:58 +0000 (19:19 -0400)]
xwayland: add explanatory comment on WM_HINTS.input

2 years agodesktop: try harder to avoid focusing unfocusable views
John Lindgren [Sat, 23 Sep 2023 16:20:44 +0000 (12:20 -0400)]
desktop: try harder to avoid focusing unfocusable views

Make desktop_focus_view() do nothing if the view is not focusable.

2 years agoview/xwayland: avoid focusing views that don't want focus
John Lindgren [Sat, 23 Sep 2023 15:51:47 +0000 (11:51 -0400)]
view/xwayland: avoid focusing views that don't want focus

XWayland views can self-declare that they don't want keyboard focus via
the ICCCM WM_HINTS property. Most of the logic is already in place to
avoid giving focus to such views (e.g. taskbars).

Add a couple of missing pieces to make this work:

- Hook up view_isfocusable() to look at WM_HINTS for XWayland views
- Adjust desktop_focus_topmost_mapped_view() to skip unfocusable views

2 years agoChase wlroots: Stop using wlr_xwayland_surface event data
Consolatis [Fri, 29 Sep 2023 02:50:47 +0000 (04:50 +0200)]
Chase wlroots: Stop using wlr_xwayland_surface event data

Follow-up from b816c1670150e265719b2fc2ff2a149b50181298
Chase wlroots: Stop using wlr_xwayland_surface event data

Chases: 27edd024f83892f4af9c5084d47b73f26966aaf1
xwayland: pass NULL as event data

2 years agoChase wlroots: Stop using wlr_drag_icon event data
Consolatis [Fri, 29 Sep 2023 02:50:38 +0000 (04:50 +0200)]
Chase wlroots: Stop using wlr_drag_icon event data

Chases: af4181f3880dedcc7c717cfd54c047737bd95ee4
drag: use unified map logic

2 years agosrc/view.c: guard xwayland include
Consolatis [Fri, 29 Sep 2023 00:29:30 +0000 (02:29 +0200)]
src/view.c: guard xwayland include

Fixes: #1118
2 years agoseat: use focus_change event to update focused/active view
John Lindgren [Wed, 27 Sep 2023 22:24:35 +0000 (18:24 -0400)]
seat: use focus_change event to update focused/active view

- Connect to wlr_seat_keyboard_state's focus_change event.
- Add view_from_wlr_surface(), which does what the name says.
- Use focus_change event along with view_from_wlr_surface() to update
  server->focused_view and set SSD states via view_set_activated().
- Eliminate desktop_focused_view() since server->focused_view should be
  reliably up-to-date now.
- Eliminate view_focus/defocus() since we can now just call
  seat_focus_surface() directly.

2 years agoREADME.md: describe --force-fallback-for option
Johan Malm [Thu, 28 Sep 2023 21:07:05 +0000 (22:07 +0100)]
README.md: describe --force-fallback-for option

2 years agokeyboard: fix release event bug after session lock
Johan Malm [Thu, 28 Sep 2023 19:44:57 +0000 (20:44 +0100)]
keyboard: fix release event bug after session lock

Do not withhold the release event associated with a keybind which executes
a keyboard-input-inhibiting client like swaylock.

In other words, make release-events of absorbed keys (those used up by a
keybind) de-register as such even though session-lock or input-inhibit is
in-force.

Fixes: issue #1114
Helped-by: @Consolatis
2 years agodesktop: switch workspaces and optionally raise in desktop_focus_view()
John Lindgren [Wed, 27 Sep 2023 22:37:28 +0000 (18:37 -0400)]
desktop: switch workspaces and optionally raise in desktop_focus_view()

Make desktop_focus_view() always switch to the workspace containing the
view being focused. It doesn't make much sense for an invisible view to
have the keyboard focus.

Also add an optional "raise" parameter to desktop_focus_view(). This
allows the common pattern of desktop_focus_view() + view_move_to_front()
to be reduced to a single function call.

2 years agokeyboard: make keybind match stricter
Johan Malm [Tue, 26 Sep 2023 16:51:54 +0000 (17:51 +0100)]
keyboard: make keybind match stricter

...and avoid failing to send release events to clients for any keys that were
not absorbed by a keybind.

Do not match keybinds if there are other non-modifier keys (not part of any
defined bind) pressed at the same time.

Only store non-modifier keycodes in the key-state.c 'pressed' array.
This makes the call to wlr_seat_keyboard_notify_enter() in seat_focus()
consistent with the equivalent in sway (in seat_keyboard_notify_enter()).

Fixes: issue #1091
2 years agoview: try to reduce confusion in focused_view tracking
John Lindgren [Tue, 26 Sep 2023 05:35:36 +0000 (01:35 -0400)]
view: try to reduce confusion in focused_view tracking

Our current approach to handling the focused/active view is a bit
confusing. In particular, it's hard to be sure when server->focused_view
is or isn't in sync with the real wlroots keyboard focus.

Try to clean things up a bit. In particular:

- Add comments to server->focused_view and desktop_focused_view() to
  clarify that they should match, but it's not guaranteed.

- desktop_focused_view() now prints a warning if it detects that
  server->focused_view is out of sync. We should keep an eye out for
  this warning, and if we see it, try to figure out why it happened.

- For consistency, use only "focus/defocus" as the verbs in function
  names rather than "activate". This is a bit arbitrary, but the idea is
  that focus is the primary action while the active/inactive state is a
  side effect.

- view_focus/defocus() replace view_set_activated() and now update both
  focus and active/inactive state, to try to keep them in sync.

- Add comments at view_focus/defocus() to warn against calling them
  directly (we should generally call the desktop.c functions).

- desktop_focus_view(NULL) is now forbidden and is no longer handled as
  a special case to clear the focus. This was (at least to me) a
  surprising behavior and caused trouble when working on another change.

- To maintain existing behavior, desktop_focus_topmost_mapped_view() now
  explicitly clears the focus if there are no mapped views.

There should be no behavioral change here.

2 years agoCONTRIBUTING.md: add wl_array_len() and ARRAY_SIZE() to API section
Johan Malm [Sat, 23 Sep 2023 16:12:25 +0000 (17:12 +0100)]
CONTRIBUTING.md: add wl_array_len() and ARRAY_SIZE() to API section

2 years agoCONTRIBUTING.md: updates notes on up-versioning
Johan Malm [Sat, 23 Sep 2023 16:05:59 +0000 (17:05 +0100)]
CONTRIBUTING.md: updates notes on up-versioning

2 years agoAdd default menu descriptions to labwc-menu.5.scd
Standreas [Fri, 22 Sep 2023 19:10:10 +0000 (21:10 +0200)]
Add default menu descriptions to labwc-menu.5.scd

2 years agoview: account for base size in resize indicator
John Lindgren [Fri, 22 Sep 2023 05:22:19 +0000 (01:22 -0400)]
view: account for base size in resize indicator

For views with a non-pixel size increment (e.g. X11 terminals), it's
helpful to subtract the base size of the window (typically including
menu bar, scrollbars, etc.) before computing the number of size
increments (e.g. cells/characters). This way, the displayed size will
exactly match the terminal grid (e.g. 80x25 or whatever).

wlr_box isn't really the best fit for size hints, so let's define a
struct view_size_hints and a nice view_get_size_hints() function,
wrapping view->impl->get_size_hints().

This also seems like a great opportunity to make view_adjust_size()
window-system-agnostic and eliminate xwayland_apply_size_hints().

2 years agobuild: bump version to 0.6.5
Johan Malm [Sat, 23 Sep 2023 15:53:32 +0000 (16:53 +0100)]
build: bump version to 0.6.5

2 years agoNEWS.md: add notes for 0.6.5
Johan Malm [Wed, 20 Sep 2023 20:07:56 +0000 (21:07 +0100)]
NEWS.md: add notes for 0.6.5

2 years agoNEWS.md: use latest keep-a-changelogs link format
Johan Malm [Mon, 18 Sep 2023 19:14:38 +0000 (20:14 +0100)]
NEWS.md: use latest keep-a-changelogs link format

...which points to https://github.com/.../compare/v0.0.1...v0.0.2
rather than a 'release' page.

2 years agocommon/buf.c: do not use memcpy for overlapping regions
Johan Malm [Sat, 23 Sep 2023 14:16:57 +0000 (15:16 +0100)]
common/buf.c: do not use memcpy for overlapping regions

2 years agoaction: do not expand env vars in Exec action
Johan Malm [Thu, 21 Sep 2023 22:09:05 +0000 (23:09 +0100)]
action: do not expand env vars in Exec action

...<command> argument (but still resolve tilde).

This makes it easier to write sh -c '' constructs without turning labwc
into a shell parser in order to expand environment variables, whilst
respecting single quotes and escaped characters as well as ignoring
subshells syntax like $(foo) and backticks.

Also, fix bug where buffer length+alloc get out-of-sync

2 years agobuf: do not expand $() in buf_expand_shell_variables()
Johan Malm [Thu, 21 Sep 2023 21:51:54 +0000 (22:51 +0100)]
buf: do not expand $() in buf_expand_shell_variables()

2 years agosrc/ssd: use view->ssd_titlebar_hidden for ssd_thickness calculations
Consolatis [Sun, 17 Sep 2023 20:41:46 +0000 (22:41 +0200)]
src/ssd: use view->ssd_titlebar_hidden for ssd_thickness calculations

Before this patch we were using the internal .enabled flag of the titlebar
tree node. This failed due to ssd_thickness() not having view->ssd assigned
when initially called. Instead of assigning view->ssd within ssd_create()
we just always use the view boolean flag directly. This fixes an issue
where a border-only view that has been snapped to an edge or region would
have a gap in the size of the titlebar on top after a Reconfigure.

Fixes #1083

2 years agoEnsure xdg and xwayland string_prop() handlers deal with destroying views
Consolatis [Thu, 21 Sep 2023 16:13:44 +0000 (18:13 +0200)]
Ensure xdg and xwayland string_prop() handlers deal with destroying views

When a view is destroyed (including override_redirect in the xwayland
case), the view_destroy() handler is called which checks for a currently
open A-Tab window switcher and causes an update there to remove the
destroying view from the list. Before view_destroy() is called, both
xwayland and xdg handlers reset the xdg_surface / xwayland_surface.

The window switcher update then creates a list of all windows which do
not have the 'skipWindowSwitcher' window rule property set. If there is
at least one 'matchOnce' window rule configured, this also tries to get
string properties of the destroying view which already had their
xdg_surface / xwayland_surface reset and thus run into an assert.

This patch fixes that so that the string_prop() handlers always return
an empty string in those cases rather than running into the assert.

For a more in-depth analyses and alternative solutions see the linked
issue.

Fixes #1082

2 years agoAdded note for localization support to menu.xml
Standreas [Wed, 20 Sep 2023 07:05:02 +0000 (09:05 +0200)]
Added note for localization support to menu.xml

Maybe mention it in the man page too?

2 years agoAdd ARRAY_SIZE() macro
Johan Malm [Sat, 16 Sep 2023 21:25:41 +0000 (22:25 +0100)]
Add ARRAY_SIZE() macro

2 years agoFix typo in labwc-theme.5.scd
Standreas [Tue, 19 Sep 2023 20:03:50 +0000 (22:03 +0200)]
Fix typo in labwc-theme.5.scd

2 years agobuild: make svg buttons optional
Johan Malm [Sun, 17 Sep 2023 10:40:48 +0000 (11:40 +0100)]
build: make svg buttons optional

Add -Dsvg=disabled to your meson setup/configure command to disable svg
buttons even if the correct version of librsvg is available.

Note that regardless of this patch and the value of the 'svg' variable,
the build will gracefully fall back to not using librsvg if the correct
version is not available.

Helped-by: @01micko
2 years agobutton-png.c: s/png_load/button_png_load/
Johan Malm [Sat, 16 Sep 2023 21:36:31 +0000 (22:36 +0100)]
button-png.c: s/png_load/button_png_load/

2 years agoSupport svg buttons
Johan Malm [Mon, 21 Aug 2023 20:26:08 +0000 (21:26 +0100)]
Support svg buttons

In the theme directory add close-{active,inactive}.svg instead of
close.xbm - and similarly for iconify, menu and max.

2 years agocommon/file-helpers.c: share file_exists() to reduce duplication
Johan Malm [Mon, 21 Aug 2023 20:07:28 +0000 (21:07 +0100)]
common/file-helpers.c: share file_exists() to reduce duplication

2 years agobutton/common.c: share button_filename() to reduce duplication
Johan Malm [Mon, 21 Aug 2023 20:03:46 +0000 (21:03 +0100)]
button/common.c: share button_filename() to reduce duplication

2 years agosrc/common/parse-bool.c: support on/off boolean values
redtide [Tue, 12 Sep 2023 23:06:29 +0000 (01:06 +0200)]
src/common/parse-bool.c: support on/off boolean values

2 years agoMerge pull request #1072 from Consolatis/feature/keycode_binds
Consolatis [Mon, 11 Sep 2023 20:00:39 +0000 (22:00 +0200)]
Merge pull request #1072 from Consolatis/feature/keycode_binds

Keybinds: keyboard layout agnostic keybinds

2 years agokeybinds: add optional layoutDependent argument
Consolatis [Mon, 11 Sep 2023 13:15:37 +0000 (15:15 +0200)]
keybinds: add optional layoutDependent argument

This allows to define keybinds as layout dependent. E.g. keybinds
only trigger if the configured key exists in the currently active
keyboard layout. The keybind will also only trigger on the physical
key that is mapped to the configured key in the active layout.

By default the new argument is false which means all keybinds by
default are layout agnostic. This optional argument can be used
to restore the earlier default behavior of having keys layout
dependent.

2 years agokeybinds: prefer keycodes over keysyms
Consolatis [Tue, 5 Sep 2023 13:18:41 +0000 (15:18 +0200)]
keybinds: prefer keycodes over keysyms

This allows keyboard layout agnostic keybinds
in a multi layout configuration.

Fixes: #1069
2 years agodocs: clarify keyboard modifiers can be used for mousebinds
Standreas [Sun, 10 Sep 2023 13:26:54 +0000 (15:26 +0200)]
docs: clarify keyboard modifiers can be used for mousebinds

Fixes: #1075
2 years agosrc/cursor: ensure interactive move/resize ends correctly for CSD clients
Consolatis [Mon, 28 Aug 2023 14:43:51 +0000 (16:43 +0200)]
src/cursor: ensure interactive move/resize ends correctly for CSD clients

Before this patch, when moving a CSD client below a layershell surface -
like a panel that was configured with either the "top" or "overlay"
layers - we'd only send a matching release button event to the client but
not actually end the interactive move operation. That caused the drag to
continue even though the user already released the mouse button.

In comparison, SSD clients were not suffering from the same issue because
the initial mouse "down" event was not attached to any client surface and
thus it would not take the first early return because there was no surface
attached to the release event.

This patch fixes the issue by reordering the conditions where we return
early. It also ensures that when we finish the move, we still send the
release event to CSD clients.

Fixes: #1053
Reported-by: @DynamoFox (thanks)
2 years agowindow-rules: add ignoreFocusRequest property
Consolatis [Sun, 3 Sep 2023 12:01:40 +0000 (14:01 +0200)]
window-rules: add ignoreFocusRequest property

This allows to reject focus requests from specific applications.

2 years agokeybinds: allow non-english based keybinds
Consolatis [Tue, 5 Sep 2023 16:25:01 +0000 (18:25 +0200)]
keybinds: allow non-english based keybinds

2 years agoconfig: replace enums with int to handle negative values
tokyo4j [Thu, 7 Sep 2023 14:43:58 +0000 (23:43 +0900)]
config: replace enums with int to handle negative values

This commit also fixes that an invalid value in <accelProfile> is interpreted as "flat"

2 years agoconfig: support <tapAndDrag> and <dragLock>
tokyo4j [Sat, 2 Sep 2023 08:32:48 +0000 (17:32 +0900)]
config: support <tapAndDrag> and <dragLock>

2 years agoCodeStyle: double indent in if statement
tokyo4j [Sat, 2 Sep 2023 08:32:29 +0000 (17:32 +0900)]
CodeStyle: double indent in if statement

2 years agosrc/menu/menu.c: support keyboard driven selection
Consolatis [Wed, 30 Aug 2023 09:20:46 +0000 (11:20 +0200)]
src/menu/menu.c: support keyboard driven selection

Fixes: #1058
Requested-by: @stefonarch
2 years agosrc/menu/menu.c: convert to wl_list_append()
Consolatis [Wed, 30 Aug 2023 00:37:08 +0000 (02:37 +0200)]
src/menu/menu.c: convert to wl_list_append()

2 years agotouch: store initial coordinate adjustments
bi4k8 [Sat, 26 Aug 2023 17:01:42 +0000 (17:01 +0000)]
touch: store initial coordinate adjustments

this avoids touch offsets jumping when a touch point moves off of a surface

2 years agosrc/osd.c: prevent crash with theme setting osd.window-switcher.width: 0
Consolatis [Sun, 27 Aug 2023 19:11:04 +0000 (21:11 +0200)]
src/osd.c: prevent crash with theme setting osd.window-switcher.width: 0

Fixes: #1050
Reported-by: @4ffy (thanks)
2 years agosrc/ssd: ensure unround corners + disabled borders are set on reload
Consolatis [Fri, 25 Aug 2023 13:37:28 +0000 (15:37 +0200)]
src/ssd: ensure unround corners + disabled borders are set on reload

E.g. when using Reconfigure or ToggleDecorations with a maximized view.

2 years agosrc/ssd: fix tiling via keybind when maximized
Consolatis [Fri, 25 Aug 2023 11:22:23 +0000 (13:22 +0200)]
src/ssd: fix tiling via keybind when maximized

The previous PR introduced an issue with tiling based actions
like SnapToEdge and SnapToRegion using outdated SSD margin
values when called via keybind while maximized. That resulted
in wrong offsets for the tiled windows.

This commit restores the functionality by forcing a re-calculation
of the SSD margin when changing the maximized state.

Thanks to @Flrian for reporting the issue via IRC.

2 years agosrc/ssd: un-round corners on maximize
Consolatis [Wed, 23 Aug 2023 02:42:30 +0000 (04:42 +0200)]
src/ssd: un-round corners on maximize

2 years agosrc/ssd: disable border on maximize
Consolatis [Tue, 22 Aug 2023 23:04:40 +0000 (01:04 +0200)]
src/ssd: disable border on maximize

Fixes #1044

2 years agoconfig: s/app_id/identifier/ for window-switcher field
Johan Malm [Sun, 20 Aug 2023 19:24:46 +0000 (20:24 +0100)]
config: s/app_id/identifier/ for window-switcher field

...to be consistent with window rules.

The use of 'app_id' for window-switcher fields is hereby deprecated.

2 years agoMove isfocusable() from desktop.c to view.c
Johan Malm [Sun, 20 Aug 2023 15:43:29 +0000 (16:43 +0100)]
Move isfocusable() from desktop.c to view.c

2 years agoAdd common/array.h with wl_array_len()
Johan Malm [Sun, 20 Aug 2023 10:56:50 +0000 (11:56 +0100)]
Add common/array.h with wl_array_len()

2 years agoview: add for_each_view()
Johan Malm [Fri, 18 Aug 2023 21:18:59 +0000 (22:18 +0100)]
view: add for_each_view()

Helped-by: @Consolatis and @heroin-moose (by a significant amount)
2 years agoosd: refactor to remove get_osd_height()
Johan Malm [Sat, 12 Aug 2023 18:59:46 +0000 (19:59 +0100)]
osd: refactor to remove get_osd_height()

2 years agoosd: simplify to only use one view-array
Johan Malm [Sat, 12 Aug 2023 18:59:05 +0000 (19:59 +0100)]
osd: simplify to only use one view-array

2 years agoview: add view_array_append()
Johan Malm [Thu, 10 Aug 2023 14:46:00 +0000 (15:46 +0100)]
view: add view_array_append()

...to reduce code duplication.

The function populates an array with views which meet any set of critera
from:

  - current-workspace
  - no-always-on-top
  - no-skipWindowSwitcher (window-rule)

Make src/osd.c use this new interface. Note that always-on-top views are
still filtered out from the window-switcher and that desktop_cycle_view()
needs to be re-worked before always-on-top views can be opted in.

2 years agoAdd window resize indicator
Consolatis [Thu, 17 Aug 2023 16:59:29 +0000 (18:59 +0200)]
Add window resize indicator

2 years agosrc/xwayland.c: make size_hints globally accessible
Consolatis [Thu, 17 Aug 2023 17:00:56 +0000 (19:00 +0200)]
src/xwayland.c: make size_hints globally accessible

2 years agocursor: prevent press on layer-subsurface from cancelling popup grab
Johan Malm [Mon, 14 Aug 2023 22:38:55 +0000 (23:38 +0100)]
cursor: prevent press on layer-subsurface from cancelling popup grab

Fixes: #1030
2 years agofind-idents.c: fix typo
Johan Malm [Sat, 12 Aug 2023 19:10:44 +0000 (20:10 +0100)]
find-idents.c: fix typo

...which so far has caused any bugs!

2 years agocheckpatch.pl: check single statement brace
Johan Malm [Thu, 10 Aug 2023 14:48:52 +0000 (15:48 +0100)]
checkpatch.pl: check single statement brace

2 years agoforeign: set parent
Johan Malm [Thu, 3 Aug 2023 20:32:58 +0000 (21:32 +0100)]
foreign: set parent

Tested with wlroots/examples/foreign-toplevel.c

Helped-by: @Consolatis
2 years agobutton: move button-png.c to button/
Johan Malm [Thu, 10 Aug 2023 14:57:20 +0000 (15:57 +0100)]
button: move button-png.c to button/

...so that all button code is in the same place.

2 years agobutton: refactor xbm code
Johan Malm [Thu, 10 Aug 2023 14:50:25 +0000 (15:50 +0100)]
button: refactor xbm code

- Rename src/xbm/ to src/button/
- Combine xbm.c parse.c tokenize.c into button-xbm.c

No functional change

2 years agocursor: cancel popup grab on mouse-press outside client itself
Johan Malm [Wed, 9 Aug 2023 15:58:18 +0000 (16:58 +0100)]
cursor: cancel popup grab on mouse-press outside client itself

...for example on any part of the server side decoration

Supercedes #826 for xdg-shell popups

Helped-by: @Consolatis
2 years agoAdd keepBorder `<theme>` option and enable it by default
Consolatis [Fri, 14 Apr 2023 07:01:13 +0000 (09:01 +0200)]
Add keepBorder `<theme>` option and enable it by default

With the new keepBorder option enabled, the
ToggleDecorations action now has 3 states:

- the first time only disables the titlebar
- the second time disables the whole SSD
- the third time enables the whole SSD again

When the keepBorder action is disabled, the old 2-state
behavior is restored, e.g. the ToggleDecorations action
only toggles between on and off.

Fixes #813

2 years agoSupport png buttons
Johan Malm [Fri, 4 Aug 2023 21:34:07 +0000 (22:34 +0100)]
Support png buttons

In the theme directory add close-{active,inactive}.png instead of
close.xbm - and similarly for iconify, menu and max.

2 years agotheme: simplify loading of xbm buttons
Johan Malm [Fri, 4 Aug 2023 21:30:16 +0000 (22:30 +0100)]
theme: simplify loading of xbm buttons

No functional change.

2 years agosrc/cursor.c: end popup grab on desktop click
Consolatis [Sun, 6 Aug 2023 10:19:58 +0000 (12:19 +0200)]
src/cursor.c: end popup grab on desktop click

Fixes #949

2 years agoRestore SnapToEdge and MoveToEdge default keybinds
Consolatis [Sun, 6 Aug 2023 08:26:04 +0000 (10:26 +0200)]
Restore SnapToEdge and MoveToEdge default keybinds

When adding the fallback keybinds we add them as string but expect them being an int.
This commit fixes that by using the same parsing routines that are used when parsing
user supplied configuration.

Fixes 1ee8715d57ddb6b444e0b089879db6f837400539
actions: use enum for _ToEdge action

2 years agoFix crash when using _ToEdge actions when using the default keybinds
Consolatis [Sun, 6 Aug 2023 07:47:37 +0000 (09:47 +0200)]
Fix crash when using _ToEdge actions when using the default keybinds

This happens because of two separate bugs:
- The action validation failed to verify the data type of the argument
- When adding the fallback keybinds we add them as string but expect them being an int

This commit fixes the first bug.

Fixes 1ee8715d57ddb6b444e0b089879db6f837400539
actions: use enum for _ToEdge actions

2 years agoview: make move_sub_views() use append_children method
Johan Malm [Sat, 5 Aug 2023 18:02:05 +0000 (19:02 +0100)]
view: make move_sub_views() use append_children method

...to share common code with minimize_sub_views()

Also, fix a bug in the move-to-back functions to move the window
hierarchy in the right order.

Helped-by: @Consolatis
2 years agoview: minimize parents/children together
Johan Malm [Wed, 2 Aug 2023 19:57:39 +0000 (20:57 +0100)]
view: minimize parents/children together

Minimize the whole view-hierarchy from top to bottom regardless of which
one in the hierarchy requested the minimize. For example, if an 'About' or
'Open File' dialog is minimized, its toplevel is minimized also, and vice
versa.

For reference:
- This is consistent with in openbox, where child views (dialogs) can be
  minimized, but when doing so the parent is also minimized.
- In mutter these types of dialogs cannot be minimized (via client-menu or
  otherwise).
- In both openbox and mutter, when a toplevel window is minimized any open
  children are also minimized.

2 years agoxwayland: fix client request-unmap bug
Johan Malm [Fri, 4 Aug 2023 21:04:42 +0000 (22:04 +0100)]
xwayland: fix client request-unmap bug

Remove foreign-toplevel handle when a client sends a request-unmap to a
minimized (therefore unmapped) view.

2 years agoxwayland: guard against mapping view without surface
Johan Malm [Fri, 4 Aug 2023 20:58:52 +0000 (21:58 +0100)]
xwayland: guard against mapping view without surface

...which may occur if a user minimizes an xwayland view (typically a
child view such as a dialog) at the same time as the client sends a
request-unmap, which xwayland clients sometimes do without actually
requesting destroy and just leave them dangling.

2 years agoview: move (z-order) ancestors with modal dialogs
Johan Malm [Wed, 19 Jul 2023 16:19:37 +0000 (17:19 +0100)]
view: move (z-order) ancestors with modal dialogs

...so that other window cannot be positioned between modal dialogs and
their parent windows. This is consistent with Gtk3 and Qt5 applications on
mutter and openbox.

2 years agoxdg: show modal dialog above parent window
Johan Malm [Mon, 17 Jul 2023 19:16:21 +0000 (20:16 +0100)]
xdg: show modal dialog above parent window

This behaviour is consistent with that of mutter and openbox.

Fixes: issue #823
2 years agolabwc-theme(5): describe color alpha value
Johan Malm [Fri, 4 Aug 2023 21:37:39 +0000 (22:37 +0100)]
labwc-theme(5): describe color alpha value

...which has been supported for a long time but not been reflected in the
man page.  Colors can be parsed as `#rrggbb aaa` with aaa representing a
decimal alpha value. This could be used to hide a button, for example:

    window.active.button.menu.unpressed.image.color: #000000 0
    window.inactive.button.menu.unpressed.image.color: #000000 0

2 years agoactions: use enum for _ToEdge actions
Consolatis [Wed, 2 Aug 2023 02:30:50 +0000 (04:30 +0200)]
actions: use enum for _ToEdge actions

This also improves the config robustness as invalid edge names will now
prevent the action to be created in the first place and the user gets
notified about the issue.

2 years agoview: move MoveRelative code from action.c and restore natural geometry
Ph42oN [Sun, 23 Jul 2023 09:04:36 +0000 (12:04 +0300)]
view: move MoveRelative code from action.c and restore natural geometry

2 years agokeyboard: fallback on raw keysyms for bindings
Johan Malm [Mon, 17 Jul 2023 19:08:32 +0000 (20:08 +0100)]
keyboard: fallback on raw keysyms for bindings

When looking up keybinds, if the translated keysyms (based on the keymap
for the keyboard) do not match a defined keybind, try raw keysyms (as if
there were no modifier translation).

This allows a user to define for example keybind with "S-1" rather than
"S-exclam". It also supports "W-S-Tab".

Fixes: issues #163 #365 #992
2 years agokeyboard: combine nsyms and *syms in struct
Johan Malm [Mon, 17 Jul 2023 19:05:53 +0000 (20:05 +0100)]
keyboard: combine nsyms and *syms in struct

...in preparation for handling raw keysyms

No functional change intended.

2 years agotheme: limit corner radius to the height of the titlebar
Johan Malm [Sat, 15 Jul 2023 20:53:50 +0000 (21:53 +0100)]
theme: limit corner radius to the height of the titlebar

2 years agotheme: fix rounded-corner bug
Johan Malm [Sat, 15 Jul 2023 20:50:40 +0000 (21:50 +0100)]
theme: fix rounded-corner bug

Make top left/right corner pieces with large border thickness pixel
perfect.

Fixes: issue #988
2 years agoChase wlroots: Stop using wlr_xwayland_surface event data
John Lindgren [Mon, 17 Jul 2023 06:33:40 +0000 (02:33 -0400)]
Chase wlroots: Stop using wlr_xwayland_surface event data

Chases: 27edd024f83892f4af9c5084d47b73f26966aaf1
xwayland: pass NULL as event data

2 years agoChase wlroots: Add missing #include
John Lindgren [Tue, 21 Feb 2023 13:03:17 +0000 (08:03 -0500)]
Chase wlroots: Add missing #include

Chases: 323f0b94db22877487bca073fca497cd033719e8
wlr_scene: Cleanup header includes

2 years agoxwayland: Fix segfault at exit (seen with wlroots master)
John Lindgren [Mon, 17 Jul 2023 07:37:21 +0000 (03:37 -0400)]
xwayland: Fix segfault at exit (seen with wlroots master)

2 years agoAdded missing closing tags
stefonarch [Sun, 16 Jul 2023 08:04:19 +0000 (10:04 +0200)]
Added missing closing tags

2 years agobuild: bump version to 0.6.4
Johan Malm [Fri, 14 Jul 2023 19:43:33 +0000 (20:43 +0100)]
build: bump version to 0.6.4

2 years agoNEWS.md: add notes on 0.6.4
Johan Malm [Mon, 26 Jun 2023 16:09:28 +0000 (17:09 +0100)]
NEWS.md: add notes on 0.6.4

2 years agodnd: fix focus at end of dnd operation
Johan Malm [Mon, 10 Jul 2023 15:56:02 +0000 (16:56 +0100)]
dnd: fix focus at end of dnd operation

By default, leave keyboard-focus with the surface that originally had it
at the end of a dnd operation.  This is consistent with the default
behaviour of openbox and mutter.

If the 'focus/followMouse' option is enabled, then focus on the surface
under the cursor at the end of the dnd operation.

Fixes: issue #976
2 years agoAdd support for ext_idle_notify_v1..
Consolatis [Sat, 8 Jul 2023 16:27:40 +0000 (18:27 +0200)]
Add support for ext_idle_notify_v1..

..and combine both idle variants into a standalone manager

2 years agofind-banned: support reading multiple files from stdin
Johan Malm [Sun, 7 May 2023 21:14:35 +0000 (22:14 +0100)]
find-banned: support reading multiple files from stdin

2 years agofind-banned: print filename with each unwanted token
Johan Malm [Mon, 3 Apr 2023 12:49:35 +0000 (13:49 +0100)]
find-banned: print filename with each unwanted token

2 years agoscripts/helper/find-idents.c: handle single line comment tokens
Consolatis [Thu, 9 Feb 2023 04:33:16 +0000 (05:33 +0100)]
scripts/helper/find-idents.c: handle single line comment tokens

2 years agoAdd scripts/find-banned.sh
Johan Malm [Mon, 30 Jan 2023 21:24:52 +0000 (21:24 +0000)]
Add scripts/find-banned.sh

2 years agoToggleKeybinds per window
Consolatis [Sun, 5 Mar 2023 09:35:56 +0000 (10:35 +0100)]
ToggleKeybinds per window

2 years agoosd: move get_osd_height() closer to where it is called from
Johan Malm [Wed, 5 Jul 2023 18:52:01 +0000 (19:52 +0100)]
osd: move get_osd_height() closer to where it is called from