]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
3 years agoxdg: Fix positioning of initially-maximized views
John Lindgren [Thu, 9 Feb 2023 21:06:07 +0000 (16:06 -0500)]
xdg: Fix positioning of initially-maximized views

- Don't overwrite pending size in map() if it was already set
- Don't reposition view in map() if maximized/fullscreen

Also, as future-proofing in case we one day allow initially-tiled views,
replace explicit maximized/fullscreen checks with view_is_floating().

3 years agoxdg: Just call view_center() now that it uses pending width/height
John Lindgren [Thu, 9 Feb 2023 06:16:24 +0000 (01:16 -0500)]
xdg: Just call view_center() now that it uses pending width/height

3 years agoview: Use pending rather than current dimensions in positioning
John Lindgren [Thu, 9 Feb 2023 06:27:30 +0000 (01:27 -0500)]
view: Use pending rather than current dimensions in positioning

This should fix race conditions (such as #671) when multiple
position changes occur in rapid succession.

3 years agoxdg: Set initial pending dimensions for the view at map
John Lindgren [Thu, 9 Feb 2023 06:21:52 +0000 (01:21 -0500)]
xdg: Set initial pending dimensions for the view at map

We would like to use the pending dimensions in view positioning
logic, so make sure they are set early on.

3 years agoview: Use wlr_box for current/pending geometry
John Lindgren [Thu, 9 Feb 2023 04:19:14 +0000 (23:19 -0500)]
view: Use wlr_box for current/pending geometry

3 years agomenu: Compute usable area for the correct output
John Lindgren [Thu, 9 Feb 2023 04:40:59 +0000 (23:40 -0500)]
menu: Compute usable area for the correct output

If a menu was opened via keybind while the cursor was on another,
differently-sized output, the wrong usable area was used to
position the menu.

3 years agoxdg: Handle corner case of move with pending resize correctly
John Lindgren [Wed, 8 Feb 2023 21:25:16 +0000 (16:25 -0500)]
xdg: Handle corner case of move with pending resize correctly

If xdg_toplevel_view_move() is called when a resize is pending
(e.g. after xdg_toplevel_view_resize() but before handle_commit()),
the newer x/y coordinates passed to move() should take precendence
over the older pending_move_resize.x/y coordinates.

This is consistent with the logic used in xwayland.c's move().

3 years agoxdg: Eliminate redundant update_x/update_y flags
John Lindgren [Wed, 8 Feb 2023 21:14:06 +0000 (16:14 -0500)]
xdg: Eliminate redundant update_x/update_y flags

struct view's pending_move_resize.update_x/update_y flags appear to
be redundant, since we can easily determine whether x/y have been
update via a simple comparison in handle_commit().

The only corner case I can think of where this change might affect
behavior, is if xdg_toplevel_view_move() is called while a resize
is still pending (e.g. after xdg_toplevel_view_configure() but
before handle_commit()). This corner case will be addressed in the
following commit.

3 years agoxwayland: Save natural geometry from initially maximized views
John Lindgren [Wed, 8 Feb 2023 02:12:56 +0000 (21:12 -0500)]
xwayland: Save natural geometry from initially maximized views

3 years agoxwayland: Fix size issue when starting VLC fullscreen
John Lindgren [Wed, 8 Feb 2023 08:20:31 +0000 (03:20 -0500)]
xwayland: Fix size issue when starting VLC fullscreen

3 years agoCI: adapt to new debian.sources format
Consolatis [Mon, 6 Feb 2023 03:20:26 +0000 (04:20 +0100)]
CI: adapt to new debian.sources format

3 years agoMerge pull request #735 from Consolatis/feature/clear_action
Johan Malm [Sat, 4 Feb 2023 18:59:38 +0000 (18:59 +0000)]
Merge pull request #735 from Consolatis/feature/clear_action

Allow clearing key/mouse bindings

3 years agoMerge pull request #747 from Consolatis/feature/foreign_output_tracking
Johan Malm [Fri, 3 Feb 2023 21:59:12 +0000 (21:59 +0000)]
Merge pull request #747 from Consolatis/feature/foreign_output_tracking

src/foreign.c: track outputs

3 years agosrc/config/rcxml.c: allow clearing key/mouse bindings
Consolatis [Sun, 29 Jan 2023 03:06:46 +0000 (04:06 +0100)]
src/config/rcxml.c: allow clearing key/mouse bindings

Fixes #567

3 years agosrc/view.c: make view_wlr_output() static
Consolatis [Thu, 2 Feb 2023 12:40:19 +0000 (13:40 +0100)]
src/view.c: make view_wlr_output() static

.. as there are no external consumers left.

3 years agosrc/foreign.c: track outputs
Consolatis [Thu, 2 Feb 2023 06:16:57 +0000 (07:16 +0100)]
src/foreign.c: track outputs

Fixes #744

3 years agosrc/foreign.c: refactor
Consolatis [Wed, 1 Feb 2023 08:27:25 +0000 (09:27 +0100)]
src/foreign.c: refactor

3 years agoEnable more compiler warnings
Consolatis [Tue, 31 Jan 2023 02:35:13 +0000 (03:35 +0100)]
Enable more compiler warnings

3 years agoCodeStyle: prevent space in code indents
Consolatis [Tue, 31 Jan 2023 10:43:45 +0000 (11:43 +0100)]
CodeStyle: prevent space in code indents

3 years agobuild: bump version to 0.6.1
Johan Malm [Sun, 29 Jan 2023 16:17:33 +0000 (16:17 +0000)]
build: bump version to 0.6.1

3 years agoNEWS.md: add notes on 0.6.1
Johan Malm [Wed, 25 Jan 2023 22:01:50 +0000 (22:01 +0000)]
NEWS.md: add notes on 0.6.1

3 years agosrc/output.c: only overwrite the automatic layout if necessary
Consolatis [Sun, 29 Jan 2023 08:58:42 +0000 (09:58 +0100)]
src/output.c: only overwrite the automatic layout if necessary

The wlroots wlr_output_layout provides two different modes of operation:
- automatically
- manually

In automatic mode wlroots reacts to new / removed outputs and resolution
changes and then adjusts the output positions within the layout itself.

The manual mode disables this behavior and thus it is the whole
responsibility of the caller (e.g. us relaying whatever wdisplays /
kanshi provides) to ensure that the layout is somewhat sane. E.g. that
it doesn't have any holes between outputs and there are no overlapping
outputs.

The mode is set for each output individually. To use (and keep using)
the automatic mode, outputs have to be added via the _add_auto() variant
(which we do) and they are not allowed to be moved via _move() (which
we currently do and thus break the automatic layout).

To fix that, this patch compares the user (tool) supplied position to the
automatically calculated position and only if they differ we call _move().

3 years agolayer: improve keyboard-interactivity
Johan Malm [Sat, 28 Jan 2023 22:34:27 +0000 (22:34 +0000)]
layer: improve keyboard-interactivity

- Process layer-shell keyboard interactivity in the map and commit
  handlers only, rather than in layers_arrange(). This allows handling of
  the layer-surface that emitted the event rather than iterating over all
  surfaces in the output layer-tree, and therefore avoids having to guess
  which surface should have keyboard preference (and it might not be the
  last one added to the list which was the assumption previously).

- Prevent seat_focus_surface() from setting keyboard focus if a layer-shell
  surface with exclusive keyboard-interactivity has the focus.

- Set cursor_context type for layer-surfaces without node-descriptors
  in order to set keyboard focus correctly in cursor_button_press().

Tested satisfactorily with xfce4-panel and gtk-layer-demo.

Fixes #725 and #704

3 years agocursor: update cursor image on scale change
Consolatis [Thu, 26 Jan 2023 00:21:43 +0000 (01:21 +0100)]
cursor: update cursor image on scale change

3 years agoensure cursor is correctly scaled at startup
bi4k8 [Tue, 20 Dec 2022 20:15:23 +0000 (20:15 +0000)]
ensure cursor is correctly scaled at startup

3 years agoSupport flicker free boot
Consolatis [Mon, 23 Jan 2023 06:15:55 +0000 (07:15 +0100)]
Support flicker free boot

Fixes #724

3 years agoEnable single-pixel-buffer-v1
Johan Malm [Sat, 14 Jan 2023 15:00:24 +0000 (15:00 +0000)]
Enable single-pixel-buffer-v1

...in order to enable cool clients like chayang

References:

- https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3428
- https://git.sr.ht/~emersion/chayang

3 years agoMerge pull request #433 from Consolatis/feature/regions
Johan Malm [Wed, 11 Jan 2023 20:24:07 +0000 (20:24 +0000)]
Merge pull request #433 from Consolatis/feature/regions

Add SnapToRegion

3 years agoSnapToRegion: Add documentation
Consolatis [Sat, 7 Jan 2023 02:30:10 +0000 (03:30 +0100)]
SnapToRegion: Add documentation

3 years agoSnapToRegion: Allow for live config updates
Consolatis [Sun, 1 Jan 2023 17:12:20 +0000 (18:12 +0100)]
SnapToRegion: Allow for live config updates

3 years agoSnapToRegion: Respect core.gap setting
Consolatis [Fri, 16 Sep 2022 04:08:28 +0000 (06:08 +0200)]
SnapToRegion: Respect core.gap setting

3 years agoSnapToRegion: Add dynamic overlay
Consolatis [Tue, 13 Sep 2022 06:15:33 +0000 (08:15 +0200)]
SnapToRegion: Add dynamic overlay

Either uses a half transparent single rect if running
hardware accelerated or uses a solid struct multirect
outline if not.

3 years agoSnapToRegion: Evacuate tiled views from destroying outputs
Consolatis [Thu, 7 Jul 2022 17:05:54 +0000 (19:05 +0200)]
SnapToRegion: Evacuate tiled views from destroying outputs

3 years agoSnapToRegion: Snap when ending a move while pressing a modifier
Consolatis [Wed, 6 Jul 2022 15:05:34 +0000 (17:05 +0200)]
SnapToRegion: Snap when ending a move while pressing a modifier

3 years agoSnapToRegion: Add overlay while moving and pressing a modifier
Consolatis [Wed, 6 Jul 2022 05:19:28 +0000 (07:19 +0200)]
SnapToRegion: Add overlay while moving and pressing a modifier

3 years agoSnapToRegion: Add regions_from_cursor()
Consolatis [Wed, 6 Jul 2022 15:26:22 +0000 (17:26 +0200)]
SnapToRegion: Add regions_from_cursor()

3 years agoSnapToRegion: Add SnapToRegion action
Consolatis [Wed, 6 Jul 2022 06:06:48 +0000 (08:06 +0200)]
SnapToRegion: Add SnapToRegion action

3 years agoSnapToRegion: Add view_snap_to_region()
Consolatis [Wed, 6 Jul 2022 15:04:21 +0000 (17:04 +0200)]
SnapToRegion: Add view_snap_to_region()

3 years agoSnapToRegion: Wire up output and handle usable_area changes
Consolatis [Wed, 6 Jul 2022 14:57:25 +0000 (16:57 +0200)]
SnapToRegion: Wire up output and handle usable_area changes

3 years agoSnapToRegion: Add config parser
Consolatis [Wed, 6 Jul 2022 15:21:02 +0000 (17:21 +0200)]
SnapToRegion: Add config parser

3 years agoSnapToRegion: Add implementation
Consolatis [Wed, 6 Jul 2022 15:37:22 +0000 (17:37 +0200)]
SnapToRegion: Add implementation

3 years agoxwayland: Add xwayland.h and move more things to xwayland.c
John Lindgren [Sat, 7 Jan 2023 22:50:33 +0000 (17:50 -0500)]
xwayland: Add xwayland.h and move more things to xwayland.c

- Move xwayland-specific struct definitions to new xwayland.h header
- Move xwayland_move_sub_views_to_front() from desktop.c to xwayland.c
- Split out xwayland_server_init/finish() from server_init/finish()
- Rename new_xwayland_surface -> xwayland_new_surface and
  xwayland_surface_new() -> handle_new_surface() for consistency
- Add "mapped" argument to xwayland_unmanaged_create() so that we can
  make unmanaged_handle_map() private to xwayland-unmanaged.c

3 years agodocs/rc.xml: Overwrite the default W-Return keybind
Consolatis [Fri, 6 Jan 2023 15:54:11 +0000 (16:54 +0100)]
docs/rc.xml: Overwrite the default W-Return keybind

.. instead of adding a new one.
Also change from sakura to foot and add comments.

3 years agosrc/action.c: Improve debugging by adding action argument to debug log
Consolatis [Fri, 6 Jan 2023 17:44:13 +0000 (18:44 +0100)]
src/action.c: Improve debugging by adding action argument to debug log

3 years agooutput: Use better arg naming for output_update_all_usable_areas()
Consolatis [Fri, 6 Jan 2023 18:54:51 +0000 (19:54 +0100)]
output: Use better arg naming for output_update_all_usable_areas()

This restores the original approach of naming the argument `layout_changed`
which fits much better than `enforce_view_arrange`. Especially when extending
the function to also handle region updates once merged.

3 years agoinclude/labwc.h: Provide MIN/MAX macros
Consolatis [Fri, 6 Jan 2023 14:06:57 +0000 (15:06 +0100)]
include/labwc.h: Provide MIN/MAX macros

3 years agoinclude/ssd.h: prefix defines with SSD_
Consolatis [Fri, 6 Jan 2023 14:56:44 +0000 (15:56 +0100)]
include/ssd.h: prefix defines with SSD_

3 years agosrc/view.c: move xwayland specific function to xwayland.c
Consolatis [Wed, 4 Jan 2023 03:18:00 +0000 (04:18 +0100)]
src/view.c: move xwayland specific function to xwayland.c

Also remove the `<xcb/xcb_icccm.h>` include as its already included
by `"labwc.h"` -> `<wlr/xwayland.h>` -> `<wlr/xwayland/xwayland.h>`.

3 years agooutput: Add output_update_usable_area/all_usable_areas()
John Lindgren [Wed, 16 Nov 2022 17:43:59 +0000 (12:43 -0500)]
output: Add output_update_usable_area/all_usable_areas()

Move the desktop_arrange_all_views() call outside layers_arrange() into
a new function, output_update_usable_area().  The new function currently
does exactly what layers_arrange() used to, but will be expanded in a
later commit.

Add output_update_all_usable_areas(), which is the same as calling
output_update_usable_area() for each output, but only calls
desktop_arrange_all_views() once.

Rebased and slightly modified by @Consolatis

3 years agotheme: support theme setting override
Johan Malm [Mon, 5 Dec 2022 21:46:16 +0000 (21:46 +0000)]
theme: support theme setting override

...by reading <config-dir>/themerc-override where <config-dir> is normally
$HOME/.config/labwc can be other locations as described in labwc-config(5)
and can also be specified by the command line option -C.

The reason for supporting theme override is to give users more fine-
grained control of settings without making local copies and modifying
themes.

3 years agosrc/output.c: Release layer tree when releasing output
yuanye [Tue, 15 Nov 2022 01:38:15 +0000 (09:38 +0800)]
src/output.c: Release layer tree when releasing output

Split off from PR #622 and slightly modified by @Consolatis

3 years agosrc/view.c: ensure natural geometry is restored even with no outputs available
Consolatis [Fri, 30 Dec 2022 18:41:34 +0000 (19:41 +0100)]
src/view.c: ensure natural geometry is restored even with no outputs available

Reported-by: @Flrian
3 years agosrc/layers.c: destroy layer surface on output loss
Consolatis [Fri, 30 Dec 2022 00:14:27 +0000 (01:14 +0100)]
src/layers.c: destroy layer surface on output loss

3 years agosrc/layers.c: ensure layers_arrange() is only called with an output set
Consolatis [Fri, 30 Dec 2022 00:37:32 +0000 (01:37 +0100)]
src/layers.c: ensure layers_arrange() is only called with an output set

3 years agosrc/layers.c: remove new_popup handler on node destruction
Consolatis [Fri, 30 Dec 2022 00:14:46 +0000 (01:14 +0100)]
src/layers.c: remove new_popup handler on node destruction

3 years agosrc/layers.c: prevent crash with no outputs available
Consolatis [Mon, 26 Dec 2022 22:11:01 +0000 (23:11 +0100)]
src/layers.c: prevent crash with no outputs available

3 years agosrc/view.c: prevent fullscreen with no outputs available
Consolatis [Mon, 26 Dec 2022 22:10:11 +0000 (23:10 +0100)]
src/view.c: prevent fullscreen with no outputs available

3 years agosrc/output.c: prevent crash with no outputs available
Consolatis [Mon, 26 Dec 2022 22:09:33 +0000 (23:09 +0100)]
src/output.c: prevent crash with no outputs available

3 years agosrc/debug.c: reset last_view
Consolatis [Mon, 2 Jan 2023 21:40:17 +0000 (22:40 +0100)]
src/debug.c: reset last_view

Before this patch following would cause a use-after-free:
- calling the Debug action when there was at least one view around
- closing that view
- calling the Debug action again

Also add a label for the layer popup tree.

3 years agopo/tr.po: update Turkish translation
01micko [Mon, 2 Jan 2023 21:08:48 +0000 (07:08 +1000)]
po/tr.po: update Turkish translation
thanks to @ersen0

3 years agopo/sv.po: update Swedish translation
Johan Malm [Mon, 2 Jan 2023 18:48:32 +0000 (18:48 +0000)]
po/sv.po: update Swedish translation

3 years agopo/es.po,it.po: update Spanish and Italian translations
01micko [Mon, 2 Jan 2023 03:02:56 +0000 (13:02 +1000)]
po/es.po,it.po: update Spanish and Italian translations

3 years agopo/de.po: update German translation
01micko [Mon, 2 Jan 2023 02:34:54 +0000 (12:34 +1000)]
po/de.po: update German translation
thanks to @Consolatis

3 years agonls: updates for new strings in menus
01micko [Mon, 2 Jan 2023 02:20:36 +0000 (12:20 +1000)]
nls: updates for new strings in menus
- also fixes updating tr.po file
- more descriptive instructions in CONTRIBUTING.md
- fix comments in po/pot files when using meson gettext tools

3 years agoserver: Filter out wp_drm_lease_device from Xwayland
Joshua Ashton [Thu, 29 Dec 2022 01:54:02 +0000 (01:54 +0000)]
server: Filter out wp_drm_lease_device from Xwayland

For now, until we resolve the true cause here either on the Xwayland
side or our side.

I intend to look into it soon.

Fixes: #553
3 years agobuild: Add drm-lease-v1 protocol to server_protocols
Joshua Ashton [Thu, 29 Dec 2022 01:52:10 +0000 (01:52 +0000)]
build: Add drm-lease-v1 protocol to server_protocols

3 years agosrc/view.c: move up view_apply_natural_geometry()
Consolatis [Mon, 2 Jan 2023 15:25:34 +0000 (16:25 +0100)]
src/view.c: move up view_apply_natural_geometry()

So its visible by all the other view_apply_xxx_geometry() functions.

3 years agodocs/themerc: add menu.width.{min,max} + menu.items.padding.{x,y}
Johan Malm [Thu, 8 Dec 2022 20:38:31 +0000 (20:38 +0000)]
docs/themerc: add menu.width.{min,max} + menu.items.padding.{x,y}

...to reflect additions introduced by f0666ba and d00327b

Move menu.overlap.* to the menu section for a more logical grouping

3 years agomenu: minor refactoring to increase readability
Johan Malm [Thu, 8 Dec 2022 20:41:38 +0000 (20:41 +0000)]
menu: minor refactoring to increase readability

3 years agosrc/view.c: reorder includes
Consolatis [Sun, 1 Jan 2023 18:35:07 +0000 (19:35 +0100)]
src/view.c: reorder includes

3 years agosrc/view.c: rename unmaximized_geometry to natural_geometry
Consolatis [Sun, 1 Jan 2023 02:57:19 +0000 (03:57 +0100)]
src/view.c: rename unmaximized_geometry to natural_geometry

3 years agosrc/view.c: use view_set_untiled() helper
Consolatis [Sat, 31 Dec 2022 20:46:05 +0000 (21:46 +0100)]
src/view.c: use view_set_untiled() helper

3 years agosrc/view.c: factor out special case natural geometry checks
Consolatis [Sat, 31 Dec 2022 21:23:00 +0000 (22:23 +0100)]
src/view.c: factor out special case natural geometry checks

3 years agosrc/view.c: factor out the various view_apply_ variants
Consolatis [Sat, 31 Dec 2022 21:01:51 +0000 (22:01 +0100)]
src/view.c: factor out the various view_apply_ variants

3 years agosrc/layers.c: minor simplification
Consolatis [Sun, 1 Jan 2023 17:26:25 +0000 (18:26 +0100)]
src/layers.c: minor simplification

3 years agosrc/view.c: on un-fullscreen restore SSD before applying previous geometry
Consolatis [Sat, 31 Dec 2022 20:20:50 +0000 (21:20 +0100)]
src/view.c: on un-fullscreen restore SSD before applying previous geometry

Before this patch following would cause the SSD to be rendered offscreen:
- snap a window to left or right edge
- toggle fullscreen to fullscreen
- toggle fullscreen to un-fullscreen

To fix that restore the SSD before calculating the new geometry.

3 years agosrc/view.c: Allow snapping to the same edge
Consolatis [Thu, 22 Dec 2022 02:22:34 +0000 (03:22 +0100)]
src/view.c: Allow snapping to the same edge

Reported-by: @Flrian via IRC
Debugged-by: @Flrian
Tested-by: @Flrian
3 years agossd: scale down button icons if necessary
Consolatis [Fri, 23 Dec 2022 21:59:27 +0000 (22:59 +0100)]
ssd: scale down button icons if necessary

This allows using large XBM button icons (larger than
the button width / height) for high and mixed DPI usecases.

Instead of scaling up the low pixel icons when moving a window to a
high DPI output we scale the icons down when moving to a non-scaled
output. The user is still responsible to create / use larger XBM
icons for their theme.

Partly fixes #609

3 years agodesktop.c: handle layer-subsurfaces in get_cursor_context()
Johan Malm [Thu, 29 Dec 2022 20:16:32 +0000 (20:16 +0000)]
desktop.c: handle layer-subsurfaces in get_cursor_context()

...to allow these surfaces to receive pointer button events

Test by running `gtk-layer-demo --keyboard exclusive`, then open the
'set margin' dialog and try setting the margin with the pointer.

3 years agolayer: s/struct wlr_box/output->usable_area/
Johan Malm [Thu, 29 Dec 2022 20:09:01 +0000 (20:09 +0000)]
layer: s/struct wlr_box/output->usable_area/

...because Linux kernel style prefers `sizeof(*foo)` over
`sizeof(struct foo)`.

3 years agolayer: rename signal-handler functions to handle_*
Johan Malm [Wed, 28 Dec 2022 18:22:27 +0000 (18:22 +0000)]
layer: rename signal-handler functions to handle_*

...rather than *_notify to comply with naming convention agreed on in
CONTRIBUTING.md

3 years agolayer: get `struct output` from wlr_output user-data
Johan Malm [Wed, 28 Dec 2022 17:40:34 +0000 (17:40 +0000)]
layer: get `struct output` from wlr_output user-data

...rather than output_from_wlr_output()

3 years agolayer: s/layers_above_shell/layers_above_views/
Johan Malm [Wed, 28 Dec 2022 17:16:17 +0000 (17:16 +0000)]
layer: s/layers_above_shell/layers_above_views/

3 years agolayer: remove wl_list layers[] from `struct output`
Johan Malm [Wed, 28 Dec 2022 17:01:22 +0000 (17:01 +0000)]
layer: remove wl_list layers[] from `struct output`

...and just use `struct wlr_scene_tree *layer_tree[]`

3 years agoinclude/layers.h: remove redundant `struct wlr_box geo`
Johan Malm [Wed, 28 Dec 2022 15:13:26 +0000 (15:13 +0000)]
include/layers.h: remove redundant `struct wlr_box geo`

3 years agolayer: use scene-graph API more fully
Johan Malm [Thu, 22 Dec 2022 21:58:55 +0000 (21:58 +0000)]
layer: use scene-graph API more fully

...and thus simplify the usage of wlr_scene_node_at(). Specifically:

- desktop.c: in get_cursor_context() use node-description for
  layer-surfaces and layer-popups. This lays the foundations for a
  pointer-enter-event being sent when a new layer-surfaces appears under
  the pointer (even if the pointer doesn not move).

- layers.c:

  * Iterate over `struct wlr_scene_tree *layer_tree[]` rather than
    `struct wl_list layers[]` when arranging layers to avoid surfaces
    being out of sync with nodes

  * Set signal handlers after scene node creation to avoid configure
    race conditions

  * Handle scene-node destroy event rather than event of
    `struct wlr_layer_surface_v1`

  * Arrange layers on map and unmap

  * Handle client request for layer-change

Fixes issue #667

3 years agosrc/workspaces.c: prevent re-focus for always-on-top views
Consolatis [Thu, 29 Dec 2022 03:50:21 +0000 (04:50 +0100)]
src/workspaces.c: prevent re-focus for always-on-top views

Before this patch a focused always-on-top view lost its keyboard
focus when switching workspaces. Now the view keeps its focus.

3 years agosrc/workspaces.c: use cached server pointer
Consolatis [Thu, 29 Dec 2022 03:49:13 +0000 (04:49 +0100)]
src/workspaces.c: use cached server pointer

3 years agodocs: update theme documentation
Flrian [Fri, 23 Dec 2022 17:20:49 +0000 (18:20 +0100)]
docs: update theme documentation

.. to reflect that its now possible to change the color of the menu button

3 years agosrc/theme.c: add menu to individual buttons
Flrian [Fri, 23 Dec 2022 17:18:05 +0000 (18:18 +0100)]
src/theme.c: add menu to individual buttons

3 years agorcxml: Make sure a default libinput category always exists
John Lindgren [Thu, 22 Dec 2022 21:44:08 +0000 (16:44 -0500)]
rcxml: Make sure a default libinput category always exists

Previously, if rc.xml defined only non-default libinput categories,
no default category was created. This meant that configure_libinput()
might totally skip configuring some devices even with default
settings, like tap-to-click.

Fix this by making sure that a default category is always created.

3 years agodocs: Fix small typo in labwc-config(5) manpage
John Lindgren [Thu, 22 Dec 2022 21:17:16 +0000 (16:17 -0500)]
docs: Fix small typo in labwc-config(5) manpage

3 years agoseat.c: minor refactoring of seat_reconfigure()
Johan Malm [Wed, 21 Dec 2022 18:19:07 +0000 (18:19 +0000)]
seat.c: minor refactoring of seat_reconfigure()

3 years agoExclude checkpatch.pl from language stats
Flrian [Tue, 20 Dec 2022 20:56:42 +0000 (21:56 +0100)]
Exclude checkpatch.pl from language stats

3 years agosubprojects/wlroots.git: use 0.16 branch
Johan Malm [Tue, 20 Dec 2022 20:20:52 +0000 (20:20 +0000)]
subprojects/wlroots.git: use 0.16 branch

There should be no API changes on this branch.

3 years agodon't set view->w and view->h when mapping xdg views
bi4k8 [Sat, 17 Dec 2022 20:47:46 +0000 (20:47 +0000)]
don't set view->w and view->h when mapping xdg views

these should only be set on commit. doing so before then confuses
code that expects these fields to be in sync with the scene tree,
such as `handle_commit`.

these were only being set so that `view_center` could read them to
compute a centered position, so instead we can simply forward the
values directly to `view_compute_centered_position` and `view_move`.

3 years agoview: limit XCB header to Xwayland after 286b2146c348
Jan Beich [Mon, 19 Dec 2022 10:47:06 +0000 (10:47 +0000)]
view: limit XCB header to Xwayland after 286b2146c348

../src/view.c:5:10: fatal error: 'xcb/xcb_icccm.h' file not found
 #include <xcb/xcb_icccm.h>
          ^~~~~~~~~~~~~~~~~

3 years agoREADME.md: fix header numbering
Flrian [Thu, 15 Dec 2022 11:43:22 +0000 (12:43 +0100)]
README.md: fix header numbering

3 years agoosd: bookend with calls to cursor_update_focus
bi4k8 [Mon, 12 Dec 2022 00:56:55 +0000 (00:56 +0000)]
osd: bookend with calls to cursor_update_focus

this updates the cursor if it is within the OSD area when OSD appears
or disappears

3 years agoosd: factor drawing out of osd_update
bi4k8 [Mon, 12 Dec 2022 00:50:57 +0000 (00:50 +0000)]
osd: factor drawing out of osd_update