]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
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

4 years agoREADME: explain meaning of lab further
Johan Malm [Sat, 13 Nov 2021 22:28:01 +0000 (22:28 +0000)]
README: explain meaning of lab further

4 years agodocs/labwc-menu.5.scd: describe submenus
Johan Malm [Sat, 13 Nov 2021 22:19:52 +0000 (22:19 +0000)]
docs/labwc-menu.5.scd: describe submenus

4 years agodocs/labwc-menu.5.scd: fix menu definition
01micko [Sat, 13 Nov 2021 21:39:24 +0000 (07:39 +1000)]
docs/labwc-menu.5.scd: fix menu definition

This is in line with 1a38cc8 and #109

4 years agoAdd SPDX identifiers
Johan Malm [Sat, 13 Nov 2021 21:56:53 +0000 (21:56 +0000)]
Add SPDX identifiers

4 years agoxwayland.c,xdg-deco.c: fix style
Johan Malm [Sat, 13 Nov 2021 21:45:12 +0000 (21:45 +0000)]
xwayland.c,xdg-deco.c: fix style

4 years agolayers: fix clang warning
Johan Malm [Sat, 13 Nov 2021 21:36:33 +0000 (21:36 +0000)]
layers: fix clang warning

...for unused variables.

We should damage the surface really, but this will soon be
overtaken by events when wlr_scene is implemented.

4 years agoresistance: check to see if the view is on the output before resisting
ARDiDo [Sat, 13 Nov 2021 18:47:12 +0000 (13:47 -0500)]
resistance: check to see if the view is on the output before resisting

4 years agoview: get the closest wlr_output in view_wlr_output()
ARDiDo [Sat, 13 Nov 2021 17:09:40 +0000 (12:09 -0500)]
view: get the closest wlr_output in view_wlr_output()

4 years agoMerge branch 'master' of https://github.com/johanmalm/labwc
Johan Malm [Tue, 9 Nov 2021 07:17:12 +0000 (07:17 +0000)]
Merge branch 'master' of https://github.com/johanmalm/labwc

4 years agodocs/menu.xml: fix root-menu definition
Johan Malm [Tue, 9 Nov 2021 07:13:40 +0000 (07:13 +0000)]
docs/menu.xml: fix root-menu definition

A menu is defined by `<menu id="" label="">`

A `<menu id="" />` element merely creates an item pointing to already
defined menu.

Fixes issue #109

4 years agobuild: when building wlroots subproject, link statically
Dima Krasner [Mon, 8 Nov 2021 18:17:50 +0000 (20:17 +0200)]
build: when building wlroots subproject, link statically

4 years agobuild: fix name collision with wlroots, when linking statically
Dima Krasner [Mon, 8 Nov 2021 18:17:08 +0000 (20:17 +0200)]
build: fix name collision with wlroots, when linking statically

4 years agotheme: add menu.overlap.{x,y}
Johan Malm [Mon, 8 Nov 2021 17:36:39 +0000 (17:36 +0000)]
theme: add menu.overlap.{x,y}

4 years agomenu: support inline submenus
Johan Malm [Mon, 8 Nov 2021 17:20:37 +0000 (17:20 +0000)]
menu: support inline submenus

...for example:

<menu id="root-menu" label="">
  <menu id="submenu" label="submenu">
    <item label="foo"></item>
  </menu>
  <item label="bar"></item>
</menu>

4 years agomenu: support submenus
Johan Malm [Tue, 2 Nov 2021 18:31:19 +0000 (18:31 +0000)]
menu: support submenus

Support submenus defined as follows:

<menu id="submenu" label="Submenu">
  <item label="item1.1"></item>
  <item label="item1.2"></item>
</menu>

<menu id="root-menu" label="">
  <menu id="submenu" />
  <item label="item0"></item>
</menu>

4 years agomousebind: update documentation
ARDiDo [Tue, 2 Nov 2021 00:43:57 +0000 (20:43 -0400)]
mousebind: update documentation

4 years agomousebind: add support for more contexts and mouse events
ARDiDo [Tue, 2 Nov 2021 00:32:14 +0000 (20:32 -0400)]
mousebind: add support for more contexts and mouse events

4 years agokeyboard: Fix cycle view taking precedence over TTY switch
Joshua Ashton [Mon, 1 Nov 2021 22:00:52 +0000 (22:00 +0000)]
keyboard: Fix cycle view taking precedence over TTY switch

I had a bug where cycle view would not close and I was unable to switch to a TTY as it was open.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agokeyboard: Fix handled check
Joshua Ashton [Mon, 1 Nov 2021 21:59:07 +0000 (21:59 +0000)]
keyboard: Fix handled check

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agowlroots.wrap: set url to https://gitlab.freedesktop.org/wlroots/wlroots
Johan Malm [Mon, 1 Nov 2021 22:07:18 +0000 (22:07 +0000)]
wlroots.wrap: set url to https://gitlab.freedesktop.org/wlroots/wlroots

4 years agooutput: update layer surfaces on output geometry changes
ARDiDo [Sat, 30 Oct 2021 14:20:06 +0000 (10:20 -0400)]
output: update layer surfaces on output geometry changes

4 years agoresistance: don't use gap value
ARDiDo [Tue, 26 Oct 2021 19:15:52 +0000 (15:15 -0400)]
resistance: don't use gap value

4 years agoresistance: update documentation + default strength value
ARDiDo [Mon, 25 Oct 2021 21:04:22 +0000 (17:04 -0400)]
resistance: update documentation + default strength value

4 years agoresistance: remove bool, add resistance.h + license
ARDiDo [Mon, 25 Oct 2021 01:31:05 +0000 (21:31 -0400)]
resistance: remove bool, add resistance.h + license

4 years agoresistance: improve readability
ARDiDo [Mon, 25 Oct 2021 01:14:05 +0000 (21:14 -0400)]
resistance: improve readability

4 years agoresistance: fix meson.build
ARDiDo [Sun, 24 Oct 2021 16:17:57 +0000 (12:17 -0400)]
resistance: fix meson.build

4 years agoresistance: move strength.c to resistance.c
ARDiDo [Sun, 24 Oct 2021 16:13:20 +0000 (12:13 -0400)]
resistance: move strength.c to resistance.c

4 years agoresistance: move to <resistance> node
ARDiDo [Sun, 24 Oct 2021 16:08:30 +0000 (12:08 -0400)]
resistance: move to <resistance> node

4 years agoresize resistance support
ARDiDo [Sun, 24 Oct 2021 02:48:04 +0000 (22:48 -0400)]
resize resistance support

4 years agoImprove expandibility
ARDiDo [Sun, 24 Oct 2021 02:31:39 +0000 (22:31 -0400)]
Improve expandibility

4 years agoPartial screen_edge_strength
ARDiDo [Sat, 23 Oct 2021 15:25:37 +0000 (11:25 -0400)]
Partial screen_edge_strength

4 years agoUpdate NEWS.md
Johan Malm [Fri, 22 Oct 2021 19:27:16 +0000 (20:27 +0100)]
Update NEWS.md

4 years agoREADME.md: add a video showing SnapToEdge
Johan Malm [Fri, 22 Oct 2021 19:25:33 +0000 (20:25 +0100)]
README.md: add a video showing SnapToEdge

Posted by @Joshua-Ashton in pull-request

4 years agoconfig: add some comments in "struct rcxml"
Johan Malm [Fri, 22 Oct 2021 19:24:39 +0000 (20:24 +0100)]
config: add some comments in "struct rcxml"

4 years agoconfig: add <core><adaptiveSync>
Johan Malm [Fri, 22 Oct 2021 19:23:09 +0000 (20:23 +0100)]
config: add <core><adaptiveSync>

4 years agoconfig: make capitalization consistent in rc.xml
Johan Malm [Thu, 21 Oct 2021 19:40:14 +0000 (20:40 +0100)]
config: make capitalization consistent in rc.xml

4 years agorc.xml.all: add keyboard repeatRate and repeatDelay
Johan Malm [Thu, 21 Oct 2021 19:38:52 +0000 (20:38 +0100)]
rc.xml.all: add keyboard repeatRate and repeatDelay

4 years agocursor: do not crash on layer popup/subsurfaces
Johan Malm [Thu, 21 Oct 2021 19:37:30 +0000 (20:37 +0100)]
cursor: do not crash on layer popup/subsurfaces

4 years agokeybind: Fix shift modifiers
Joshua Ashton [Thu, 21 Oct 2021 17:09:53 +0000 (17:09 +0000)]
keybind: Fix shift modifiers

Need to lower the syms for these to match!

Signed-off-by: Joshua Ashton <joshua@froggi.es>
4 years agolayers: support popups
Johan Malm [Wed, 20 Oct 2021 21:32:46 +0000 (22:32 +0100)]
layers: support popups