]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
4 years agoconfig: de-couple <FollowMouse> and <raiseOnFocus>
Johan Malm [Wed, 29 Dec 2021 14:04:41 +0000 (14:04 +0000)]
config: de-couple <FollowMouse> and <raiseOnFocus>

Set these two variables indepently of each other as this is cleaner and
more explicit.

In openbox <raiseOnFocus> only applies if <followMouse> is set, but there
is no need to immitate this.

4 years agosrc/foreign.c: verify associated view is still valid
Consolatis [Tue, 28 Dec 2021 05:08:35 +0000 (06:08 +0100)]
src/foreign.c: verify associated view is still valid

Closes #172

4 years agoview:c Do not overwrite unmaximized dimensions on fullscreen
Consolatis [Mon, 27 Dec 2021 23:55:34 +0000 (00:55 +0100)]
view:c Do not overwrite unmaximized dimensions on fullscreen

Before: window -> maximize -> fullscreen -> unfullscreen would reset pre maximized state
Now: window -> maximize -> fullscreen -> unfullscreen -> unmaximize works as expected

4 years agoFix build on Alpine Linux
Johan Malm [Tue, 28 Dec 2021 15:06:33 +0000 (15:06 +0000)]
Fix build on Alpine Linux

Issue #144

Add `#define _POSIX_C_SOURCE 200809L` to avoid the error below:

../src/cursor.c: In function 'cursor_update_focus':
../src/cursor.c:271:2: warning: implicit declaration of function
'clock_gettime' [-Wimplicit-function-declaration]
  271 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |  ^~~~~~~~~~~~~
../src/cursor.c:271:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
  271 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |                ^~~~~~~~~~~~~~~
../src/cursor.c:271:16: note: each undeclared identifier is reported only
once for each function it appears in
../src/cursor.c: In function 'is_double_click':
../src/cursor.c:486:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
  486 |  clock_gettime(CLOCK_MONOTONIC, &now);
      |                ^~~~~~~~~~~~~~~

4 years agoview.c: Remove 'activated' flag when minimizing a view
Consolatis [Mon, 27 Dec 2021 22:41:33 +0000 (23:41 +0100)]
view.c: Remove 'activated' flag when minimizing a view

Before this change a window that had been minimized showed up with states Minimized and Activated.
For foreign-toplevel clients like taskbars that could mean to handle multiple windows at once
having a 'activated' state even though they were clearly minimized.

4 years agoFix use-after-free errors detected by valgrind
John Lindgren [Mon, 27 Dec 2021 14:44:03 +0000 (09:44 -0500)]
Fix use-after-free errors detected by valgrind

Handlers for the "destroy" signal need to unregister themselves from the
signal (using wl_list_remove()) before invoking free().

    Invalid write of size 8
       at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
       by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
       by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
       by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
       by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)
     Address 0xc3213d8 is 424 bytes inside a block of size 704 free'd
       at 0x484118B: free (vg_replace_malloc.c:755)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
       by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
       by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
       by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)
     Block was alloc'd at
       at 0x48435FF: calloc (vg_replace_malloc.c:1117)
       by 0x113E22: xdg_surface_new (xdg.c:401)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48EABE7: handle_xdg_surface_commit (wlr_xdg_surface.c:331)
       by 0x4908FE7: surface_commit_state (wlr_surface.c:457)
       by 0x524DD49: ??? (in /usr/lib/libffi.so.8.1.0)
       by 0x524D266: ??? (in /usr/lib/libffi.so.8.1.0)
       by 0x487D322: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x48785CB: ??? (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110DAC: main (main.c:81)

    Invalid write of size 8
       at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
       by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
       by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
       by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
       by 0x48D2D55: multi_backend_destroy (backend.c:59)
       by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110E71: UnknownInlinedFun (server.c:406)
       by 0x110E71: main (main.c:83)
     Address 0xc466568 is 24 bytes inside a block of size 56 free'd
       at 0x484118B: free (vg_replace_malloc.c:755)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
       by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
       by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
       by 0x48D2D55: multi_backend_destroy (backend.c:59)
       by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
       by 0x110E71: UnknownInlinedFun (server.c:406)
       by 0x110E71: main (main.c:83)
     Block was alloc'd at
       at 0x48435FF: calloc (vg_replace_malloc.c:1117)
       by 0x11590F: new_input_notify (seat.c:137)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
       by 0x48CDCEE: UnknownInlinedFun (events.c:109)
       by 0x48CDCEE: UnknownInlinedFun (events.c:242)
       by 0x48CDCEE: UnknownInlinedFun (backend.c:58)
       by 0x48CDCEE: handle_libinput_readable (backend.c:48)
       by 0x48CE1BE: backend_start.lto_priv.0 (backend.c:114)
       by 0x48D2CE5: multi_backend_start (backend.c:33)
       by 0x110C45: UnknownInlinedFun (server.c:375)
       by 0x110C45: main (main.c:68)

4 years agoFix coding style
Johan Malm [Sun, 26 Dec 2021 23:29:01 +0000 (23:29 +0000)]
Fix coding style

4 years agoCONTRIBUTING.md: wrap commit messages at 74 characters
Johan Malm [Sun, 26 Dec 2021 23:14:21 +0000 (23:14 +0000)]
CONTRIBUTING.md: wrap commit messages at 74 characters

4 years agoDelete .clang-format
Johan Malm [Sun, 26 Dec 2021 23:10:39 +0000 (23:10 +0000)]
Delete .clang-format

The file is not accurate and clang-format cannot describe our coding
style

4 years agodocs/rc.xml.all: update with default mouse-bindings
Johan Malm [Sun, 26 Dec 2021 23:02:07 +0000 (23:02 +0000)]
docs/rc.xml.all: update with default mouse-bindings

4 years agobuild: use wlroots 0.15.0
Johan Malm [Sun, 26 Dec 2021 22:42:51 +0000 (22:42 +0000)]
build: use wlroots 0.15.0

4 years agocursor: add cursor_update_focus()
Johan Malm [Sun, 26 Dec 2021 22:09:41 +0000 (22:09 +0000)]
cursor: add cursor_update_focus()

...and call it from desktop_move_to_front() in order force an enter event
on the surface below the cursor when cycling views.

Inspired by PR #164 - just restructured it a bit.

Suggested-by: @bi4k8
4 years agocursor: fix setting of resize_edges
Johan Malm [Sun, 26 Dec 2021 21:35:37 +0000 (21:35 +0000)]
cursor: fix setting of resize_edges

Only calculate nearest `resize_edges` if not clear from the server-side
deco under the cursor.

4 years agodocument mouse buttons and newly-supported mouse contexts
bi4k8 [Sat, 11 Dec 2021 22:57:47 +0000 (22:57 +0000)]
document mouse buttons and newly-supported mouse contexts

4 years agoadd mouse bindings for window edges to rc.xml.all
bi4k8 [Sat, 11 Dec 2021 22:57:22 +0000 (22:57 +0000)]
add mouse bindings for window edges to rc.xml.all

4 years agomove edge resizing from hard-coded to configuration
bi4k8 [Sat, 11 Dec 2021 22:49:28 +0000 (22:49 +0000)]
move edge resizing from hard-coded to configuration

4 years agoimplement corner/edge mouse contexts
bi4k8 [Sat, 11 Dec 2021 22:48:28 +0000 (22:48 +0000)]
implement corner/edge mouse contexts

4 years agoCheck the return value of wlr_output_layout_get() for NULL
John Lindgren [Fri, 24 Dec 2021 20:53:49 +0000 (15:53 -0500)]
Check the return value of wlr_output_layout_get() for NULL

wlr_output_layout_get() seems to return NULL for disabled outputs.

Fixes: #174
4 years agoProofread README.md
John Lindgren [Fri, 24 Dec 2021 19:33:54 +0000 (14:33 -0500)]
Proofread README.md

I couldn't help but notice some typos in README.md, and figured I might
as well fix them.

Spelling:

    simplicy -> simplicity
    inteded -> intended
    if -> is

Compound words:

    light-weight -> lightweight
    wall-paper -> wallpaper
    re-inventing -> reinventing
    re-loaded -> reloaded

Grammar/usage:

    & -> and
    binds -> bindings
    missing "the"

4 years agoview.c: end interactive mode when maximizing a view
ARDiDo [Thu, 23 Dec 2021 17:22:46 +0000 (12:22 -0500)]
view.c: end interactive mode when maximizing a view

4 years agodocs/rc.xml.all: Add focus + raise to TitleBar movement / maximize
Consolatis [Thu, 23 Dec 2021 04:58:28 +0000 (05:58 +0100)]
docs/rc.xml.all: Add focus + raise to TitleBar movement / maximize

4 years agoconfig/rcxml: Allow multiple <action>s inside of a <mousebind>
Consolatis [Thu, 23 Dec 2021 04:37:57 +0000 (05:37 +0100)]
config/rcxml: Allow multiple <action>s inside of a <mousebind>

Issue arises when using the default config from docs/rc.xml.all.
Without this patch only the last action defined inside a <mousebind>
will have an effect.

Without a config or when defining the same <mousebind> multiple times
with each containing only a single <action> the issue does not exist.

4 years agoImplement foreign toplevel close
Consolatis [Thu, 23 Dec 2021 11:24:24 +0000 (12:24 +0100)]
Implement foreign toplevel close

4 years agokeyboard: absolve release event if press was bound
Johan Malm [Tue, 21 Dec 2021 22:25:59 +0000 (22:25 +0000)]
keyboard: absolve release event if press was bound

When key press events are handled by compositor keybindings, do not
forward the corresponding release events to clients.

4 years agoOSD: fix stuck OSD when NumLock or CapsLock are activated
ARDiDo [Sat, 18 Dec 2021 15:33:56 +0000 (10:33 -0500)]
OSD: fix stuck OSD when NumLock or CapsLock are activated

4 years agobuild: bump wlroots dependency version number
ARDiDo [Fri, 17 Dec 2021 15:32:43 +0000 (10:32 -0500)]
build: bump wlroots dependency version number

4 years agocursor: scale xcursor for all output scales
ARDiDo [Fri, 17 Dec 2021 15:20:57 +0000 (10:20 -0500)]
cursor: scale xcursor for all output scales

4 years agoosd: fix crash when props are NULL
bi4k8 [Thu, 16 Dec 2021 16:24:13 +0000 (16:24 +0000)]
osd: fix crash when props are NULL

this happened while running Xwayland *over* waypipe, so is likely not a common case, but is possible

4 years agodocument Focus and Raise actions
bi4k8 [Sat, 11 Dec 2021 23:03:38 +0000 (23:03 +0000)]
document Focus and Raise actions

4 years agodocument Client/Frame/Desktop mouse contexts
bi4k8 [Sat, 11 Dec 2021 23:12:05 +0000 (23:12 +0000)]
document Client/Frame/Desktop mouse contexts

4 years agodocument Resize action
bi4k8 [Sat, 11 Dec 2021 22:58:00 +0000 (22:58 +0000)]
document Resize action

4 years agofix crash when a minimized window closes
bi4k8 [Sat, 11 Dec 2021 23:24:44 +0000 (23:24 +0000)]
fix crash when a minimized window closes

e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal

simply don't unmap xdg or xwayland views if they are not currently marked as mapped

4 years agodocument tapButtonMap setting
bi4k8 [Sun, 12 Dec 2021 22:12:46 +0000 (22:12 +0000)]
document tapButtonMap setting

4 years agoimplement libinput tapButtonMap setting
bi4k8 [Sun, 12 Dec 2021 22:12:30 +0000 (22:12 +0000)]
implement libinput tapButtonMap setting

this is a standard libinput setting that was not previously exposed

4 years agoConfig: add OSD font configuration
ARDiDo [Mon, 6 Dec 2021 22:44:28 +0000 (17:44 -0500)]
Config: add OSD font configuration

4 years agodesktop: rename functions to increase consistency
Johan Malm [Mon, 6 Dec 2021 21:23:49 +0000 (21:23 +0000)]
desktop: rename functions to increase consistency

...from
- desktop_raise_view()
- desktop_move_view_to_end_of_cycle()

to
- desktop_move_to_front()
- desktop_move_to_back()

4 years agolabwc-action(5): add PreviousWindow
Johan Malm [Mon, 6 Dec 2021 21:13:21 +0000 (21:13 +0000)]
labwc-action(5): add PreviousWindow

4 years agodesktop: simplify desktop_move_view_to_end_of_cycle()
Johan Malm [Mon, 6 Dec 2021 21:07:08 +0000 (21:07 +0000)]
desktop: simplify desktop_move_view_to_end_of_cycle()

4 years agoquery passed prop, not 'title'
bi4k8 [Mon, 6 Dec 2021 20:16:30 +0000 (20:16 +0000)]
query passed prop, not 'title'

4 years agomove windows to back of cycle when they are minimized
bi4k8 [Fri, 3 Dec 2021 02:36:38 +0000 (02:36 +0000)]
move windows to back of cycle when they are minimized

4 years agoimplement PreviousWindow action
bi4k8 [Fri, 3 Dec 2021 01:07:24 +0000 (01:07 +0000)]
implement PreviousWindow action

4 years agoraise activated foreign windows
bi4k8 [Mon, 6 Dec 2021 03:16:58 +0000 (03:16 +0000)]
raise activated foreign windows

this is required for taskbars to behave as expected

4 years agoFix typo in README
ARDiDo [Sun, 5 Dec 2021 15:13:34 +0000 (10:13 -0500)]
Fix typo in README

4 years agokeyboard: Remove redundant damage_all_outputs() call
John Lindgren [Sat, 4 Dec 2021 15:25:26 +0000 (10:25 -0500)]
keyboard: Remove redundant damage_all_outputs() call

It was already called earlier in handle_compositor_keybindings().

4 years agokeyboard: Allow canceling the Alt-Tab switcher with Escape
John Lindgren [Sat, 4 Dec 2021 15:22:34 +0000 (10:22 -0500)]
keyboard: Allow canceling the Alt-Tab switcher with Escape

This is a standard feature in most window managers (OpenBox
included) that allow window-switching via Alt-Tab.

4 years agoaction: Switch to next window when pressing Alt-Tab once
John Lindgren [Sat, 4 Dec 2021 15:06:21 +0000 (10:06 -0500)]
action: Switch to next window when pressing Alt-Tab once

In OpenBox (as in most other stacking window managers), pressing
Alt-Tab once will cycle to the next window.  This is especially
convenient in workflows which require switching back and forth
frequently between the two top windows.

4 years agocursor.c: fix switch statement indentation
Johan Malm [Fri, 3 Dec 2021 23:17:12 +0000 (23:17 +0000)]
cursor.c: fix switch statement indentation

4 years agointeractive.c: fix style
Johan Malm [Fri, 3 Dec 2021 23:15:28 +0000 (23:15 +0000)]
interactive.c: fix style

4 years agoCONTRIBUTING.md: add link to checkpatch.pl
Johan Malm [Fri, 3 Dec 2021 23:14:52 +0000 (23:14 +0000)]
CONTRIBUTING.md: add link to checkpatch.pl

4 years agoAdd CONTRIBUTING.md
Johan Malm [Fri, 3 Dec 2021 22:44:06 +0000 (22:44 +0000)]
Add CONTRIBUTING.md

4 years agodocs/rc.xml.all: add Client and Root mousebinds
Johan Malm [Fri, 3 Dec 2021 22:14:37 +0000 (22:14 +0000)]
docs/rc.xml.all: add Client and Root mousebinds

4 years agorcxml.c: set default Client Right/Middle Press
Johan Malm [Fri, 3 Dec 2021 22:11:09 +0000 (22:11 +0000)]
rcxml.c: set default Client Right/Middle Press

Raise+Focus, just as for Left Press

4 years agorcxml.c: add Alt-Left/Right to default mousebinds
Johan Malm [Fri, 3 Dec 2021 22:02:38 +0000 (22:02 +0000)]
rcxml.c: add Alt-Left/Right to default mousebinds

4 years agodocs/rc.xml.all: add Alt-Left/Right mousebinds
Johan Malm [Fri, 3 Dec 2021 21:56:21 +0000 (21:56 +0000)]
docs/rc.xml.all: add Alt-Left/Right mousebinds

Alt-Left button for "Move"
Alt-Right button for "Resize"

4 years agoOSD: fix segfault when no app_id is set
ARDiDo [Fri, 3 Dec 2021 21:16:59 +0000 (16:16 -0500)]
OSD: fix segfault when no app_id is set

4 years agoaction: If we have a view that is an activator, use that instead of the current focus...
Joshua Ashton [Fri, 3 Dec 2021 16:37:53 +0000 (16:37 +0000)]
action: If we have a view that is an activator, use that instead of the current focus window

If we don't switch focus, we want the close button to close the window associated with it, not the current focus window.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agocursor: Clear grabbed_view when switching from MOVE/GRAB
Joshua Ashton [Fri, 3 Dec 2021 08:12:37 +0000 (08:12 +0000)]
cursor: Clear grabbed_view when switching from MOVE/GRAB

Better not to leave a dangling pointer to screw us over later.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agointeractive: Fix crash if a window is destroyed while moving it
Joshua Ashton [Fri, 3 Dec 2021 08:09:19 +0000 (08:09 +0000)]
interactive: Fix crash if a window is destroyed while moving it

Need to clean this up if it's our grabbed window!

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agomove window raise/focus on click from hard-coded logic to default mouse binding
bi4k8 [Wed, 1 Dec 2021 23:19:04 +0000 (23:19 +0000)]
move window raise/focus on click from hard-coded logic to default mouse binding

4 years agoimplement root menu display as a default mouse binding
bi4k8 [Wed, 1 Dec 2021 23:16:50 +0000 (23:16 +0000)]
implement root menu display as a default mouse binding

4 years agoimplement Raise and Focus actions
bi4k8 [Wed, 1 Dec 2021 22:07:07 +0000 (22:07 +0000)]
implement Raise and Focus actions

4 years agoreplace hard-coded ShowMenu on root button press with mouse binding trigger
bi4k8 [Wed, 1 Dec 2021 22:17:33 +0000 (22:17 +0000)]
replace hard-coded ShowMenu on root button press with mouse binding trigger

4 years agoimplement foreign toplevel activate
bi4k8 [Thu, 2 Dec 2021 14:12:32 +0000 (14:12 +0000)]
implement foreign toplevel activate

4 years agocorrectly detect when cursor is over titlebar
bi4k8 [Thu, 2 Dec 2021 23:05:23 +0000 (23:05 +0000)]
correctly detect when cursor is over titlebar

this was broken when we added ssd_part_types other than NONE that are not decoration

4 years agoforward click events to layer surfaces
bi4k8 [Wed, 1 Dec 2021 02:44:55 +0000 (02:44 +0000)]
forward click events to layer surfaces

this was broken when we moved to swallowing mouse events that triggered "Frame"-context mouse bindings. layer surfaces don't run mouse binding logic, so they need mouse events unconditionally forwarded.

4 years agofix interaction between Move action and click bindings
bi4k8 [Thu, 2 Dec 2021 14:07:17 +0000 (14:07 +0000)]
fix interaction between Move action and click bindings

in order to allow the Move action to be bound to "press" on mouse binding contexts that also have "click" bindings, we should not short-circuit event processing when the input_mode is not passthrough (the "normal" mode). doing so seems to have been intended to prevent mouse bindings from being triggered during move/resize/menu interactions, but this does not seem to occur in practice. instead, `cursor_button`'s early return in this case caused the "release" side of "click" bindings to be ignored if their "press" side began an action that changes input_mode (e.g. Move).

the cleaner way to fix this interaction would be to use "drag" rather than "press" for Move bindings, but implementing "drag" is more complexity than I want to include in this changeset.

this change is its own commit to make it easy to bisect for, in case it causes regressions.

4 years agohandle mouse release bindings on root window
bi4k8 [Wed, 1 Dec 2021 22:13:04 +0000 (22:13 +0000)]
handle mouse release bindings on root window

4 years agodo not add mouse bindings with no set context
bi4k8 [Wed, 1 Dec 2021 22:34:51 +0000 (22:34 +0000)]
do not add mouse bindings with no set context

4 years agoswallow mouse events only when bindings on Frame mouse contexts are triggered
bi4k8 [Wed, 1 Dec 2021 02:44:55 +0000 (02:44 +0000)]
swallow mouse events only when bindings on Frame mouse contexts are triggered

4 years agodefine ssd_part_contains to define the mouse context subset relation
bi4k8 [Wed, 1 Dec 2021 22:10:33 +0000 (22:10 +0000)]
define ssd_part_contains to define the mouse context subset relation

4 years agoimplement handling for Client, Frame, and Root/Desktop (conflated for now) mouse...
bi4k8 [Wed, 1 Dec 2021 22:17:04 +0000 (22:17 +0000)]
implement handling for Client, Frame, and Root/Desktop (conflated for now) mouse contexts

4 years agoparse menu names from Menu mouse-bindings
bi4k8 [Wed, 1 Dec 2021 02:41:20 +0000 (02:41 +0000)]
parse menu names from Menu mouse-bindings

4 years agoimplement Resize as an action
bi4k8 [Wed, 1 Dec 2021 02:38:53 +0000 (02:38 +0000)]
implement Resize as an action

this requires action() to know the resize edges to use, so thread them through

4 years agoparse and respect modifiers for mouse bindings
bi4k8 [Wed, 1 Dec 2021 02:32:24 +0000 (02:32 +0000)]
parse and respect modifiers for mouse bindings

4 years agomake parse_modifiers public
bi4k8 [Wed, 1 Dec 2021 02:28:41 +0000 (02:28 +0000)]
make parse_modifiers public

4 years agobe stricter about what counts as a double-click
bi4k8 [Wed, 1 Dec 2021 02:42:01 +0000 (02:42 +0000)]
be stricter about what counts as a double-click

4 years agofix signal handlers
bi4k8 [Wed, 1 Dec 2021 02:25:51 +0000 (02:25 +0000)]
fix signal handlers

avoid segfaulting sigint/sigterm handlers and drop an unused argument from sighup handler

4 years agodocs/autostart: add swayidle example
Johan Malm [Sun, 28 Nov 2021 22:54:22 +0000 (22:54 +0000)]
docs/autostart: add swayidle example

4 years agocursor: support XCURSOR_THEME and XCURSOR_SIZE
Johan Malm [Sun, 28 Nov 2021 22:50:37 +0000 (22:50 +0000)]
cursor: support XCURSOR_THEME and XCURSOR_SIZE

Use environment variables XCURSOR_THEME and XCURSOR_SIZE to set cursor
theme and size respectively. Default size is 24.

Find icons themes with the command below or similar:

    find /usr/share/icons/ -type d -name "cursors"

4 years agocursor.c: rebase cursor when exiting interactive mode
Johan Malm [Sun, 28 Nov 2021 22:14:23 +0000 (22:14 +0000)]
cursor.c: rebase cursor when exiting interactive mode

cursor_rebase() sets the cursor icon and sends a motion-event to the
surface below the cursor. It is made public in anticipation of using it
in various view_* functions.

4 years agointeractive.c: set move/resize cursor
Johan Malm [Sun, 28 Nov 2021 21:47:24 +0000 (21:47 +0000)]
interactive.c: set move/resize cursor

Fixes issue #124

4 years agoFix graphical artifacts after adding/removing outputs
John Lindgren [Sat, 27 Nov 2021 21:47:49 +0000 (16:47 -0500)]
Fix graphical artifacts after adding/removing outputs

When an output is added or removed, the position of the other
outputs can also change, resulting in windows moving between them.
We need to redraw all the outputs (not just the new one) to prevent
stale/corrupted screen contents.

4 years agoTitle repainting: move call to damage_all_outputs() to view_update()
ARDiDo [Sat, 27 Nov 2021 19:35:27 +0000 (14:35 -0500)]
Title repainting: move call to damage_all_outputs() to view_update()

4 years agoFix invisible cursor at startup
John Lindgren [Sat, 27 Nov 2021 18:48:48 +0000 (13:48 -0500)]
Fix invisible cursor at startup

4 years agoForce repaint after window title changes
John Lindgren [Sat, 27 Nov 2021 16:00:50 +0000 (11:00 -0500)]
Force repaint after window title changes

When a window title changed dynamically (for example when running
"cd" within an xfce4-terminal), the titlebar did not immediately
update to show the new title.  (The titlebar would update as soon
as the mouse cursor moved.)

4 years agoFix minor style violations
Johan Malm [Fri, 26 Nov 2021 19:27:50 +0000 (19:27 +0000)]
Fix minor style violations

4 years agoRemove min/max macros
Johan Malm [Fri, 26 Nov 2021 19:16:00 +0000 (19:16 +0000)]
Remove min/max macros

...and replace with a local MAX macro, because:

- They contain a ({}) construct which is a GNU extension and that's
  against Drew's coding style
- min() is not used anyway
- MAX() clashes with cairo's macro, so best to not add this in labwc.h

4 years agoview.c: fix coding style
Johan Malm [Fri, 26 Nov 2021 18:49:44 +0000 (18:49 +0000)]
view.c: fix coding style

4 years agodocs/rc.xml.all: add TitleBar Left-Press mousebind
Johan Malm [Fri, 26 Nov 2021 18:30:30 +0000 (18:30 +0000)]
docs/rc.xml.all: add TitleBar Left-Press mousebind

<context name="TitleBar">
  <mousebind button="Left" action="Press">
    <action name="Move"/>
  </mousebind>
</context>

4 years agolabwc-action(5): add "Move" action
Johan Malm [Fri, 26 Nov 2021 18:30:11 +0000 (18:30 +0000)]
labwc-action(5): add "Move" action

4 years agoBasic support for Move action
John Lindgren [Fri, 26 Nov 2021 18:03:15 +0000 (13:03 -0500)]
Basic support for Move action

- Add Move as a default mouse binding for a Titlebar Press action
- Remove the hard-coded handling in cursor_button()

Example config snippet:

    <mouse>
      <context name="Titlebar">
        <mousebind button="Left" action="Press">
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Move"/>
        </mousebind>
      </context>
    </mouse>

4 years agoEnable new outputs (before setting mode)
John Lindgren [Fri, 26 Nov 2021 15:52:09 +0000 (10:52 -0500)]
Enable new outputs (before setting mode)

Fixes the following error with wlroots-git 0.14.0.r391.g585a908a-1:

    [DEBUG] [types/output/output.c:603] Tried to modeset a disabled output

4 years agoHiDPI: fix move_to_edge and snap_to_edge
ARDiDo [Wed, 24 Nov 2021 22:15:37 +0000 (17:15 -0500)]
HiDPI: fix move_to_edge and snap_to_edge

4 years agoHiDPI: fix osd placement and maximized scale
ARDiDo [Wed, 24 Nov 2021 16:11:48 +0000 (11:11 -0500)]
HiDPI: fix osd placement and maximized scale

4 years agoHiDPI: send enter and leave events to views when switching monitors
ARDiDo [Mon, 15 Nov 2021 19:59:03 +0000 (14:59 -0500)]
HiDPI: send enter and leave events to views when switching monitors

4 years agoHiDPI: send output_enter events to views when they open
ARDiDo [Sat, 13 Nov 2021 17:32:01 +0000 (12:32 -0500)]
HiDPI: send output_enter events to views when they open

4 years agoAdd support for basic idle and idle inhibitor protocols
ARDiDo [Mon, 22 Nov 2021 21:35:57 +0000 (16:35 -0500)]
Add support for basic idle and idle inhibitor protocols

4 years agoserver: chase swaywm/wlroots@fdf3169b4185
Jan Beich [Sun, 21 Nov 2021 07:01:16 +0000 (07:01 +0000)]
server: chase swaywm/wlroots@fdf3169b4185

ld: error: undefined symbol: wlr_backend_get_renderer
>>> referenced by output.c
>>>               labwc.p/src_output.c.o:(render_rect)
>>> referenced by output.c
>>>               labwc.p/src_output.c.o:(render_rect)
>>> referenced by output.c
>>>               labwc.p/src_output.c.o:(render_texture)
>>> referenced 5 more times

Based on https://github.com/swaywm/sway/commit/5865af75cf80
Based on https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/a6538ced3587

4 years agoREADME: make openbox link point to openbox.org
Johan Malm [Sat, 13 Nov 2021 22:29:14 +0000 (22:29 +0000)]
README: make openbox link point to openbox.org

4 years agoREADME: add lavalauncher to recommended apps
Johan Malm [Sat, 13 Nov 2021 22:28:28 +0000 (22:28 +0000)]
README: add lavalauncher to recommended apps