Commit graph

186 commits

Author SHA1 Message Date
Consolatis
6c42aced3d Support flicker free boot
Fixes #724
2023-01-23 22:10:22 +01:00
Consolatis
eb5c8cfdad SnapToRegion: Add dynamic overlay
Either uses a half transparent single rect if running
hardware accelerated or uses a solid struct multirect
outline if not.
2023-01-11 18:52:24 +01:00
Consolatis
43fe138385 SnapToRegion: Add config parser 2023-01-11 18:52:23 +01:00
John Lindgren
41a4176b17 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.
2022-12-22 22:18:27 +00:00
Consolatis
7cc80b7a99 src/action.c: Provide generic parsing of XML action arguments
.. and use it within src/config/rcxml.c and src/menu/menu.c.

This fixes being unable to use the `direction` argument in menu entries.

Reported-by: mahk via IRC
2022-12-10 19:55:53 +00:00
Consolatis
5aac35a27a src/config/rcxml.c: Check for modifiers when merging mousebinds
Previously mosuebinds for the same context using the same button
but different modifiers would be merged, e.g. only the last one
would survive the merge. This commit adds the missing check for
keyboard modifiers.

Fixes #630

Reported-by: @lidgnulinux
2022-11-18 12:44:49 +01:00
bi4k8
2b753a98b8 Support smooth scroll and horizontal scroll
note that this changes Scroll mousebinds from taking a "button"
attribute to taking a "direction" attribute
2022-11-15 21:57:36 +00:00
bi4k8
92a98164c3 src/config/rcxml.c: distinguish no and unknown font places
Currently, the `rc.xml` parser applies font settings in a `<font>` tag with an
unknown value for its `place` attribute to all fonts. This means that whatever
the final unknown-`place` `<font>` tag is in a user's `rc.xml` applies to all
text drawn by labwc.

Instead, only treat `<font>` tags with an empty or missing `place` attribute as
applying globally, and warn when encountering unknown `place` attribute values
(which will help us find font places to support).
2022-11-11 22:45:47 +01:00
Arnaud Vallette d'Osia
209e09a1f6 Scroll-Bindings: Add default config
By default we switch workspaces when scrolling
on the desktop to match the Openbox behavior.
2022-11-06 22:03:50 +01:00
Johan Malm
cce2fffa1d rcxml.c: combine common code in fill_{key,mouse}bind() 2022-10-30 18:26:45 +00:00
Johan Malm
e9c3080f76 rcxml.c: support 'to.action' in mousebind
...in support to specifying 'left', 'right' and so on with actions
GoToDesktop and SendToDesktop.

For example:

    <mouse>
      <default/>
      <context name="Desktop">
        <mousebind button="Up" action="Scroll">
          <action name="GoToDesktop" to="left"/>
        </mousebind>
        <mousebind button="Down" action="Scroll">
          <action name="GoToDesktop" to="right"/>
        </mousebind>
      </context>
    </mouse>
2022-10-30 18:26:45 +00:00
Consolatis
89ad0b808f s/wl_list_insert(list.prev...)/wl_list_append(list...)/ 2022-10-05 19:50:36 +01:00
Johan Malm
d424514e24 Fix minor coding-style violations
...based on https://github.com/johanmalm/checkpatch.pl
2022-09-22 22:39:44 +01:00
John Lindgren
a54d378e6c common: Add znew/znew_n() macros 2022-09-18 15:25:19 -04:00
John Lindgren
cb40cdc36c common: Add additional memory utilities (xzalloc() etc.) 2022-09-17 10:57:30 -04:00
Johan Malm
84e64b9ce3 config: s/OSD/OnScreenDisplay/ in <theme><font place="OSD">
...to comply with Openbox 3.6 spec [1]

"OSD" is still honoured to maintain backward compatibility.

[1]: http://openbox.org/wiki/Help:Configuration#Theme
2022-09-16 01:15:11 +02:00
John Lindgren
07a83c19f0 config: Add support for font slant and weight 2022-09-15 21:48:05 +01:00
Johan Malm
4ba59f7074 rcxml.c: enable tap be default on non-touch devices
Some trackpads do not honour tap if we only enable it on touch-devices.
2022-09-11 21:26:32 +01:00
John Lindgren
ebd0a5d526 config: Redefine Title context to include blank areas of Titlebar
... and use Title for the Drag (Move) and DoubleClick (Maximize)
titlebar actions, which are unexpected when the cursor is over one
of the window buttons.
2022-09-09 15:23:13 -04:00
Consolatis
ea6007d34c src/config/rcxml.c: Add support for <devault /> mousebinds
This loads default mousebinds and provides a way to keep config files
simpler whilst allowing user specific binds.

Note that if no rc.xml is found, or if no <mouse><mousebind> entries
exist, the same default mousebinds will be loaded even if the <devault />
element is not provided.

Example usage (with a slight spelling error):

  <mouse>
    <default />
    <context name="Root">
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="desktop-menu" />
      </mousebind>
    </context>
  </mouse>

Co-Authored-By: @johanmalm

Fixes #416
2022-08-30 16:39:09 +01:00
Consolatis
3afd666cc4 src/config/rcxml.c: Replace earlier mousebinds by later ones 2022-08-30 16:39:09 +01:00
Consolatis
7b995788ee src/config/rcxml.c: Merge default mousebinds 2022-08-30 16:39:09 +01:00
Flrian
c1490b632d Add config option to disable preview outlines 2022-08-24 20:21:14 +01:00
Johan Malm
19dea7450b keybind: remove default alt-escape for Exit
...because too many have exited the compositor by mistake trying to get
out of alt-tab cycling or similar.
2022-08-12 22:50:56 +02:00
Consolatis
79b1630724 config/rcxml.c: Fix parsing of adaptiveSync setting 2022-07-14 01:01:10 +02:00
Consolatis
9b49f19a73 src/action.c: Convert action->arg to a list of action_arg
In preperation for Actions that require multiple arguments
2022-07-04 16:19:28 +01:00
Consolatis
c93d625938 workspaces: Add workspace actions 2022-06-15 22:26:21 +02:00
Consolatis
ae2fa1571b workspaces: Implement config parsing 2022-06-15 22:26:21 +02:00
Consolatis
519375a7f8 Revert "config: support <mouse><default />"
This reverts commit 3d337857b7.

Revert for now until we have some infrastructure in place to
selectively replace default {key,mouse}binds with custom ones.

Fixes #304
Reported-by: @01micko
2022-04-26 19:56:06 +02:00
Johan Malm
3d337857b7 config: support <mouse><default />
This loads default mousebinds and provides a way to keep config files
simpler whilst allowing user specific binds.

Note that if no rc.xml is found, or if no <mouse><mousebind> entries
exist, the same default mousebinds will be loaded even if the <default />
element is not provided.

Example usage:

  <mouse>
    <default />
    <context name="Root">
      <mousebind button="Right" action="Press">
        <action name="Execute" command="my-menu-application" />
      </mousebind>
    </context>
  </mouse>
2022-04-22 17:52:01 +01:00
Johan Malm
edc5338af4 Add command line option -C to specify config directory
Also expand usage message to explain what each option means
2022-04-22 17:00:36 +01:00
Johan Malm
5b34c81768 Fix trivial coding style breaches 2022-04-04 20:53:36 +01:00
Consolatis
b7b1e8064f Add WindowMenu button 2022-01-26 06:17:41 +00:00
Consolatis
759b26b5c1 Add window menu 2022-01-26 06:17:41 +00:00
Liam Middlebrook
875b258602 output: Add option to preview the contents of the current cycle_view
Add the 'cycleViewPreview.core' option to rc.xml to enable previews of
the selected view when cycling between windows. Default this option to
be disabled to match current behavior.
2022-01-23 16:02:54 +00:00
Consolatis
c484ab252e config/rcxml: Prevent overwriting action argument 2022-01-23 10:44:51 -05:00
Consolatis
f0a3f365e5 Centralize freeing of action lists
Reduces some code duplication and makes it easier to extend struct action
2022-01-23 10:36:04 -05:00
Consolatis
d9cef42721 CodeStyle 2022-01-09 06:37:39 +00:00
Consolatis
87f4a60e38 Allow mouse movements to trigger SnapToEdge 2022-01-08 10:30:03 +00:00
ARDiDo
a893607a0e mousebindings: change default focus and raise to press from drag.
This raises the window without having to drag it.
2022-01-07 22:05:07 +00:00
ARDiDo
5935a78fb4 mouse: add support for drag mouse event 2022-01-07 22:05:07 +00:00
Consolatis
2b82bdcdb7 More robust rc.xml parsing 2022-01-06 19:44:00 +00:00
Consolatis
0b45cce648 Rewrite action handling to allow multiple actions at once 2022-01-05 16:22:41 +00:00
Johan Malm
c797dbe189 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.
2021-12-29 14:04:41 +00:00
bi4k8
26d3d13a82 move edge resizing from hard-coded to configuration 2021-12-26 21:31:11 +00:00
Consolatis
fa18f347e5 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.
2021-12-23 09:53:11 -05:00
bi4k8
a3796fa6f3 implement libinput tapButtonMap setting
this is a standard libinput setting that was not previously exposed
2021-12-12 19:00:58 -05:00
ARDiDo
859495a8be Config: add OSD font configuration 2021-12-06 17:44:28 -05:00
Johan Malm
3df4ade615 rcxml.c: set default Client Right/Middle Press
Raise+Focus, just as for Left Press
2021-12-03 22:11:09 +00:00
Johan Malm
04d69d8711 rcxml.c: add Alt-Left/Right to default mousebinds 2021-12-03 22:02:38 +00:00