Commit graph

1117 commits

Author SHA1 Message Date
Consolatis
3699a2a7f6 desktop_node_and_view_at(): handle layer surfaces
+ Replace some tabs with spaces in include/node.h

Fixes: #278
2022-05-25 21:48:28 +01:00
Consolatis
499df78531 src/cursor.c: Ignore out-of-surface movement for surfaces without views 2022-05-25 21:32:48 +01:00
Consolatis
b24b9d2d23 src/cursor.c: Ensure we send a release event for out-of-surface scrolling 2022-05-25 21:32:48 +01:00
Johan Malm
81810db3b6 cursor: offset xdg invisible border when dragging outside view
Note: view->padding was deleted in commit b279550 as the wlroots
scene-graph xdg-surface commit handler offsets the CSD invisible border.
If view->padding still existed, we could have used that, but considering
that this is probably the only place where this offset will now be
needed (because we're generating surface local coordinates), it's simpler
to just do it locally.

Related to issue #340

Written-by: @Consolatis
2022-05-24 17:49:21 +01:00
Consolatis
6dd290afc9 src/cursor.c: Fix branch condition for out-of-view selecting/dragging
Instead of using the stored view for comparison use the actual surface.

Before this patch, there were situations where the branch intended for
out-of-window text selection / scrollbar dragging was used even though
the cursor never left the surface.

Partly fixes #340
2022-05-24 17:35:32 +01:00
Johan Malm
fbcdf38b52
Merge pull request #334 from Consolatis/fix/maintainers
Update list of package maintainers
2022-05-20 21:20:42 +01:00
Consolatis
53a6d6f158 Update list of package maintainers 2022-05-20 22:15:38 +02:00
Johan Malm
9df491c544 resistance.c: init flags in resistance_resize_apply() too 2022-05-18 20:53:46 +01:00
Johan Malm
87a64b64fa resistance.c: initialize 'flags' to zero
Failure to initialize this variable sometimes causes windows to stick to
edges during move/resize.

Issues #331 and #309 may be related to this
2022-05-18 16:52:49 +01:00
Johan Malm
8a058ba7b6
Merge pull request #330 from Consolatis/chase/wlroots_xdg_version
Chase wlroots xdg_shell version
2022-05-18 16:46:33 +01:00
Consolatis
d8a877749e Chase wlroots xdg_shell version
To update the wlroots subproject use
meson subprojects update wlroots
2022-05-18 14:04:22 +02:00
Joshua Ashton
9070b12c1b README: Document what is needed to run on NVIDIA
Closes: #324
2022-05-18 06:32:00 +01:00
Johan Malm
01f92883eb NEWS.md: add notes on 0.5.2 2022-05-17 20:39:49 +01:00
Consolatis
fbbe273155 src/xwayland.c: keep SSD state on unmap/map cycle
Move SSD related map() work into the !view->been_mapped branch,
similar to src/xdg.c.

Without this patch following series of events restores the initial
state of the SSD when activating the view:
- spawn xcalc
- observe it shows the SSD
- toggleDecorations to hide the SSD (via keybinding or window menu)
- minimize xcalc (via some panel or A-Space)
- activate xcalc (via some panel or A-Tab)
- observe the SSD is back visible
2022-05-17 17:34:26 +01:00
Consolatis
0f54974430
Merge pull request #321 from eli-schwartz/meson-subproject-cleanup
meson: use proper dependency fallback for wlroots
2022-05-10 01:32:32 +02:00
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