Commit graph

1002 commits

Author SHA1 Message Date
Eli Schwartz
2656cf525f
meson: use proper dependency fallback for wlroots
Make the subproject wrap file declare the dependencies it provides.

Remove the manual subproject invocation and allow Meson to select
whichever wlroots it finds which satisfies the version requirement --
either a system one via pkg-config, or the subproject fallback.

Use a dependency-generic method of acquiring wlroots configuration info
-- enabled features are present in the pkg-config file and additionally
exported as declare_dependency() variables, so there is no need to do C
preprocessor checks for it.

This ensures that Meson best practices are followed, and also...

Fixes #318
2022-05-09 17:48:43 -04:00
Johan Malm
e2632e8587 labwc-action(5): remove incorrect <command>
<action name="Close"> does not support a <command> option
2022-05-06 21:57:13 +01:00
Johan Malm
5944813566 menu: support <action name="Execute"> option <execute>
<exectue> is a deprecated name for <command>.
See: http://openbox.org/wiki/Help:Actions#Action_syntax

But some openbox3 menu generators still use it, for example
https://wiki.archlinux.org/title/xdg-menu - so let's support it for
backward compatibility.
2022-05-06 21:55:46 +01:00
Johan Malm
9554be0ce7 menu: avoid logging on <item label="" icon="">
Labwc does not support menu icons, but we should not log errors if a
menu file contains icons as in the example below:

<item label="" icon="">
  <action name="Execute">
    <command></command>
  </action>
</item>
2022-05-06 21:52:46 +01:00
Johan Malm
b50d0ea4c8 docs/autostart: use wlopm with *
With swayidle timeout/resume, use wlopm --off/--on with * instead of
specifying output names. When * is given as parameter to an operation
wlopm will do the operation for all discovered outputs.

https://git.sr.ht/~leon_plickat/wlopm/tree/master/item/wlopm.1#L68
2022-05-04 21:52:20 +01:00
Johan Malm
9f181de082 Move .gitignore to subprojects/
Because it keeps the toplevel directory cleaner
2022-05-03 20:55:24 +01:00
Johan Malm
2961807e89 subprojects/seatd.wrap: s/master/0.6.4/ 2022-05-03 20:53:41 +01:00
Johan Malm
81f216b6a2 xwayland: handle set_override_redirect events
This is needed to allow X11 applications to create surfaces as
non-override_redirect and then change them to override_redirect later

Without this gitk-menus and rofi are treated as xwayland-views with
associated server-side-decoration and forced positioning.
2022-05-03 20:45:30 +01:00
01micko
cbed8acf01 nls: add native language support
- adds labwc.pot and po files for de, es, it and sv
- added notes in NEWS.md and CONTRIBUTING.md
- addresses #269
- conditional upon `msgfmt` being installed
- can be disabled at build time
2022-05-02 10:33:42 +01:00
Consolatis
e75af14d3d src/output.c: Make sure we are always using the correct scene_node
Also make sure we are only applying layout specific changes
once the output specific ones were committed successfully.

Fixes #312
Reported-By: @fakeczg
2022-05-02 09:54:01 +01:00
Johan Malm
60966f5fde src/ssd/ssd.c: remove superfluous WLR_ERROR log message 2022-04-28 22:33:56 +01:00
Johan Malm
bacabdc4a1 xdg-shell: set fallback geometry if width/height == 0 on unmaximize 2022-04-28 22:29:10 +01:00
Johan Malm
a1cf5b3e96 xdg-shell: set view position before view_maximize()
...on first map so that view->unmaximized_geometry is known even if an
xdg-shell application started in maximized mode.

Fixes issue #305
Reported-by: @01micko
2022-04-28 22:29:10 +01:00
yizixiao
8b45ff6829 cursor.c:func is_double_click add check view 2022-04-28 22:05:39 +01:00
Johan Malm
420ff8c8d9 server.c: remove redundant TODO comment 2022-04-26 21:58:23 +01:00
Johan Malm
76a85ae87d view: do not crash on missing output
We should survive all outputs being disabled
2022-04-26 21:55:04 +01:00
Johan Malm
b94f3b1af0 src/common/dirs.c: add missing slash
Change "opt/share/themes" to "/opt/share/themes"
2022-04-26 21:50:24 +01: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
bb2a98645b layer: handle output_destroy.notify without crash
Steps to reproduce crash:
- run nested with two outputs (e.g. WLR_WL_OUTPUTS=2 ./build/labwc)
- start panel on one output (e.g. waybar)
- close that output

Backtrace pointed to output_destroy_notify() at ../src/layers.c:92

Reported-by: @Consolatis
2022-04-24 22:24:47 +01:00
Consolatis
73930f7e0f view: Refactor view destruction some more 2022-04-23 08:59:06 +01:00
Johan Malm
0ec63a153b docs/environment: add WLR_NO_HARDWARE_CURSORS example 2022-04-22 17:55:31 +01:00
Johan Malm
f925fe5893 theme: change window.label.text.justify default to center
It just looks better :)
2022-04-22 17:54:20 +01: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
Joshua Ashton
d0b9680d00 view: Refactor view destruction
Consolidates all of the view destruction code for xwl + xdg into one function.

Fixes several notable bugs along the way:
  - Fixes a crash when alt tabbing when a selected view gets destroyed.
  - Fixes the OSD not updating to reflect a view has been destroyed.
2022-04-22 01:58:52 +02:00
Johan Malm
dee370f1b4 README.md: move important links to top 2022-04-21 21:27:41 +01:00
Johan Malm
6bc457659e labwc-menu(1): fix s/openbox/labwc/ typo 2022-04-21 21:26:04 +01:00
Johan Malm
3a9b1d2c16 docs/autostart: add swayidle with wlopm example
...to turn outputs on/off following the addition of
wlr-output-power-management protocol support (commit c23397f3)
2022-04-21 21:22:10 +01:00
Johan Malm
b27955050f xdg-shell: remove view->padding
With the wlroots scene-graph API, the padding variable is no longer
needed for windows with Client Side Decoration (CSD).
2022-04-21 20:21:36 +01:00
Johan Malm
286b2146c3 Chase wlroots X11 hints update 2022-04-20 18:48:49 +01:00
Johan Malm
c7aaa8dd61 Print deprecation notice when running SUID
Tracking swaywm/sway@e1db1f8

Add soft deprecation warning to highlight future intent of removing the
code which drops SUID privileges. libseat now has a better alternative in
the form of seatd-launch which uses the normal seatd daemon & libseat
backend and takes care of SUID.

Fixes issue #212
2022-04-20 18:17:39 +01:00
Johan Malm
fa37fba0b0 osd: fix compiler warning 2022-04-20 18:08:10 +01:00
Johan Malm
48c9e6fda0 osd: show alt-tab switcher center-aligned on all outputs
Fixes issue #283
2022-04-20 17:45:10 +01:00
Johan Malm
a234e71b29 view: increase accuracy of center-alignment
When center-aligning, take into account usable area and server-side
decoration (if used).
2022-04-19 23:01:23 +01:00
Consolatis
6b4d9b9383 Add ToggleAlwaysOnTop action 2022-04-09 17:18:39 +01:00
Johan Malm
cfca377ca2 wlroots.wrap: set revision to latest commit
This is better than `revision = master` because:

  - It enables labwc commits to be checked out and build without manually
    having to find the right wlroots commit to build with
  - The labwc master is always buildable without user intervention even
    if there are breaking changes in the wlroots master branch

Suggested in issue #289
2022-04-08 22:13:45 +01:00
Johan Malm
f0fbf6cfcc NEWS.md: add notes on 0.5.1 2022-04-08 22:06:51 +01:00
Johan Malm
5b34c81768 Fix trivial coding style breaches 2022-04-04 20:53:36 +01:00
John Lindgren
8e1f115486 cursor: Fix "jumping opposite edges" issue when resizing
Commit 08c537e ("xwayland: Honor size increments from
WM_SIZE_HINTS") adjusted only the window width/height according
to the size hints.  If resizing from the top or left edge of the
window, we also need to adjust the window position to keep the
bottom or right edge from jumping around.
2022-04-04 17:28:52 +01:00
Consolatis
47912aebb6 cursor.c: Do not segfault on missing drag icon
Observed by moving tabs in chromium wayland native
(started with --ozone-platform-hint=wayland).
2022-03-30 18:22:48 +01:00
Johan Malm
3826d7ef36 CONTRIBUTING.md: add notes on packaging 2022-03-28 21:39:15 +01:00
Johan Malm
a188526859 touch.c: fix coding style (sx,sy) vs (nx,ny)
Prefer surface to node naming convention for coordinates
2022-03-28 21:35:59 +01:00
Joshua Ashton
57a937bdf2 output: Implement drm_lease_v1
Needed for VR to work properly.
2022-03-28 21:13:51 +01:00
Johan Malm
b23774e561 xwayland.c: fix coding style 2022-03-28 20:51:59 +01:00
Johan Malm
c153bbc0b2 touch.c: fix coding style
Mostly "foo* bar"-should-be-"foo *bar" warnings and space before brackets
2022-03-28 20:50:18 +01:00
Johan Malm
bca2e9be60 Chase wlroots wlr_seat_keyboard() refactoring
wlr_seat_keyboard() now takes wlr_keyboard
2022-03-28 20:41:53 +01:00
bi4k8
401b282772 fix crash when changing TTY
also add an assertion to clarify the contract of `output_by_name`
2022-03-21 21:08:48 +00:00
bi4k8
4c3bae0794 implement touch support
this is mostly plumbing; the most interesting logic is in touch_get_coords
2022-03-21 21:06:41 +00:00
Johan Malm
a2a2e093ef cursor.c: fix bad cherry-pick in previous commit (64f7b9d) 2022-03-21 20:33:10 +00:00
Consolatis
64f7b9dd2b Restore Drag mouse bindings and proper double click
Fixes #258 and #259

Reported-by: @ahmadraniri1994
Reported-by: @01micko
Suggested-by: bi4k8 <bi4k8@github>
2022-03-21 18:08:04 +00:00