Commit graph

2220 commits

Author SHA1 Message Date
Jens Peters
567b81ea10 config: add tablet button mapping configuration
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2023-12-29 20:22:46 +00:00
Johan Malm
f0b72e3af7 ci: include scripts/find-banned.sh
...to search for functions which have been banned from our code base,
because they're too easy to misuse, and even if used correctly,
complicate audits, cause inconsistencies and/or make static analysis
harder.
2023-12-29 11:47:55 +01:00
Johan Malm
235e11f6c9 xbm: s/u32/argb32/ function name change 2023-12-29 11:46:16 +01:00
Jared Baur
6faee17d20 Add touchpad device type
It is nice to have finer granularity for device types to allow for
configurations such as using `naturalScroll` on touchpads, but not on
regular pointer devices such as mice.
2023-12-29 08:08:32 +00:00
Andrew J. Hesford
e3cd189769 feat: add "AutoPlace" action
The AutoPlace action will apply placement_find_best() to an active view,
moving it to a position on its output that will minimize overlap with
other views.
2023-12-28 22:09:44 +00:00
Johan Malm
4b6239ee0c osd: refactor to eliminate usage of g_strcmp0()
...to allow inclusion of ./scripts/find-banned in CI

No functional change intended.
2023-12-28 20:41:49 +01:00
Johan Malm
e77dddbc59 keyboard: fix virtual keyboard bug
Do no process virtual keyboard keycodes (just the keysyms).

Reproduce bug by issuing `wlrctl keyboard type xyz` and observe only 'x'
when 'xyz' was expected.

The 'y' and 'z' were matched in match_keybinding() in the keycode section and
returned keybinds for `XF86_AudioLowerVolume` and `XF86_AudioRaiseVolume`
respectively.

Fixes: #1367
2023-12-28 19:00:49 +01:00
Johan Malm
7c59351774 Revert "xdg: Fix visual glitch when resizing xfce4-terminal from left edge"
This reverts commit 31ec8f050c.

Commit c59aeb5 solves this in a different (hopefully more elegant) way.

Related-to: #1370
2023-12-28 10:22:23 +00:00
Andrew J. Hesford
c59aeb5673 xdg: sync pending when applying geometry
Applications may respond to pending resize requests either by ignoring
them or substituting alternative sizes (for example, when mpv constrains
resizes to keep its aspect ratio fixed). In these cases, view->pending
will fall out of sync with the actual view geometry. This will cause
problems when subsequent operations (e.g., MoveToEdge) use the pending
geometry to decide where to place the window.

To fix this, reset view->pending to be equal view->current when either:

1. The requested size change has been commited, to the scene graph, and
   no subsequent changes are pending; or

2. The requested size change has been ignored by the client.
2023-12-28 10:13:52 +00:00
Andrew J. Hesford
7c91f36c13 .gitignore: ignore vim swap files 2023-12-28 10:13:52 +00:00
Jens Peters
605f9e9181 seat: initialize tablet tool or pad
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2023-12-27 11:09:26 +00:00
Jens Peters
2b96799a05 input: add drawing tablet setup and event listeners
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2023-12-27 11:09:26 +00:00
Jens Peters
58e9724007 input: add cursor move and button emulation
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
2023-12-27 11:09:26 +00:00
kyak
d2d469133f
osd: support full app_id in window switcher (#1309)
Support showing full application
identifier or the trimmed variant in window switcher OSD.

Regression notice: For anyone using ‘identifier’ in window-switcher field configuration, change it to ‘trimmed_identifier’.
2023-12-27 10:55:49 +00:00
Weblate
ccd4ab943e Translation updates from weblate
Co-authored-by: A S Alam <amanpreet.alam@gmail.com>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Priit Jõerüüt <lxqtwlate@joeruut.com>
Co-authored-by: Sabri Ünal <libreajans@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: kmephistoh <kanhaosmile@gmail.com>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/et/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pa/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/tr/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/uk/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/zh_CN/
Translation: Labwc/labwc
2023-12-26 21:04:17 +00:00
Andrew J. Hesford
52aafcc054 feat: automatic window placement
With automatic placement, new top-level windows will be placed to
minimize overlap with other windows already on screen.
2023-12-26 19:20:06 +00:00
Andrew J. Hesford
ef62d47ad1 feat: under-cursor window placement
With under-cursor placement, new top-level windows will be centered
under the cursor rather than centered on the active view.
2023-12-26 19:20:06 +00:00
Standreas
ce3c5ab958 Removed characters slipped in 2023-12-24 10:08:35 +00:00
Standreas
96dc3c82a9 Fixed menu link 2023-12-24 10:08:35 +00:00
Standreas
e7a66ba3c6 Added translation information 2023-12-24 10:08:35 +00:00
kyak
ffe4b815d8 Update Russian translation 2023-12-23 09:36:03 +01:00
kyak
266690091f Remove headers not being used directly
Fix clangd warnings regarding headers not being used directly.
2023-12-22 20:19:39 +00:00
Jens Peters
6c287969d3 NEWS.md: Fix typo 2023-12-22 20:05:06 +00:00
Johan Malm
eb41fb1e0b build: bump version to 0.7.0 2023-12-22 17:03:32 +00:00
Johan Malm
5d53ab0675 NEWS.md: update notes for 0.7.0 2023-12-22 16:59:37 +00:00
Weblate
6be5983af9 Translation updates from weblate
Co-authored-by: Heimen Stoffels <vistausss@fastmail.com>
Co-authored-by: Jan Rolski <wbcwknvstb@proton.me>
Co-authored-by: Roberalz <lumintnian@outlook.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/es/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/eu/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/gl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/nl/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/pl/
Translation: Labwc/labwc
2023-12-22 16:58:42 +00:00
Jens Peters
44c79c4963 xwayland: Prevents usage of invalid data pointer
There are situations where the data pointer of a parent is NULL.
Checking for NULL first fixes e.g. a segmentation fault in CLion
when opening the settings window from a popup menu.

See also https://github.com/labwc/labwc/issues/1351#issuecomment-1867475324
2023-12-22 11:24:49 +01:00
daniel
1e807ce654 Add Portuguese translation 2023-12-21 22:29:21 +00:00
Weblate
f5f00ee9bd Translation updates from weblate
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/de/
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/it/
Translation: Labwc/labwc
2023-12-21 22:28:50 +00:00
Weblate
9ea6104fce Translation updates from weblate
Co-authored-by: Standreas <standreas@riseup.net>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.lxqt-project.org/projects/labwc/labwc/
Translation: Labwc/labwc
2023-12-21 18:08:02 +00:00
John Lindgren
a3f880716f xwayland: fix issue with panel getting stuck offscreen
For unknown reasons, XWayland surfaces that are completely offscreen
seem not to generate commit events. In rare cases, this can prevent an
offscreen window from moving onscreen (since we wait for a commit event
that never occurs). As a workaround, move offscreen surfaces
immediately.

This fixes an issue that I can reproduce by having qmpanel displayed on
a (larger) external monitor, then undocking the laptop so that qmpanel
requests a simultaneous move+resize to the (smaller) laptop display.
2023-12-21 06:01:46 +00:00
Johan Malm
3101b0c5b1 menu: move ToggleOmnipresent to workspaces
...and rename it to "Always on Visible Workspace"

Issue: #1316
2023-12-21 02:47:44 +01:00
Johan Malm
b7ee8b16f3 theme: move more button fallback logic to theme.c
...and simplify button_xbm_load() by splitting it into one function that
loads an xbm file and another that creates an icon from a builtin
bitmap.
2023-12-21 02:42:23 +01:00
Consolatis
27de4e6398 theme: create hover button fallbacks
...by copying the non-hover variant and adding a transparent overlay.

Co-authored-by: @johanmalm
2023-12-21 02:42:23 +01:00
John Lindgren
d207e97992 theme: use non-hover button variants as fallback
Some themes don't have hover variants for button pixmaps.
It looks better visually to use the non-hover variants as fallbacks
rather than the built-in 6x6 pixmaps.
2023-12-21 02:42:23 +01:00
Johan Malm
6a2a52c0ad seat: do not update active_view on layer-shell keyboard focus
...because layer-shell clients are not views and we want to be able to
use foreign-toplevel protocol on the active view even if a client such as
a panel has taken keyboard focus.

Written-by: @Consolatis

Fixes: #1336
2023-12-19 20:34:07 +00:00
Johan Malm
3a959cc74b s/focused_view/active_view/ 2023-12-19 20:34:07 +00:00
John Lindgren
447c67df62 output: do not call wlr_scene_output_layout_add_output() twice
Fixes an assertion failure that occurred if reconfiguring outputs after
an output had been disabled using wlopm --off.

Fixes: #1303
2023-12-19 01:03:08 +01:00
01micko
17cbfb7299 docs: add png|svg icon descriptions for themes, fix minor typo 2023-12-16 20:16:19 +00:00
Andrew J. Hesford
7eae03117e fix: fall-through to default cursor in cursor_get_from_edge()
When assertions are disabled, providing an unexpected input to
cursor_get_from_edge will cause the non-void function to terminate
without a return value. This may be effectively unreachable in practice.
However, returning a default cursor as a fall-through case will both
silence a compiler warning and prevent catastrophy should the function
ever be called with a permitted value.
2023-12-16 20:11:05 +00:00
Florian
ee0617ae23 CONTRIBUTING.md: update deprecated meson command 2023-12-16 18:37:17 +00:00
01micko
481b849152 labwc.pot: update for new OmniPresent menu
closes #1311
2023-12-12 07:28:11 +01:00
Tomi Ollila
c5852db5b5 docs/labwc-theme.5.scd: made text fit in max 80-column wide lines
For general consistency and better readability as source.
2023-12-11 21:58:35 +00:00
kyak
268191fce8
Add theme option to configure boxes from workspace OSD
This allows to configure width and height of "boxes" displayed in the
workspace OSD. A setting of `0` disables the boxes.
2023-12-11 10:41:33 +01:00
kyak
45e0dad3f1
src/output.c: fix strncpy warning
Fixes #1307
2023-12-11 10:33:06 +01:00
Johan Malm
5cc6a5b3e1 theme: partially revert c79b8ba
...so that svg and png icons only support the max_toggled_hover format.

There is no need to support max_hover_toggled because there are no
backward compatibility considerations as Openbox does not handle png and
svg icons.
2023-12-09 22:19:23 +01:00
Johan Malm
393f8fadab theme: use max_toggled_hover.xbm
...and treat max_hover_toggled.xbm as an alternative name supported for
compatibility reasons.

Use the following button filename schema: "BUTTON [TOGGLED] [STATE]"
with the words separted by underscore and with the following meaning:
  - BUTTON can be one of 'max', 'iconify', 'close', 'menu'
  - TOGGLED is either 'toggled' or nothing
  - STATE is 'hover' or nothing.

This is consistent with the openbox.org wiki and it is believed that this
is how the vast majority of extant openbox themes out there are written.

But please be aware that it is actually different to vanilla Openbox which
uses: "BUTTON [STATE] [TOGGLED]" following a commit in 2014 which broke
themes and led to some distros patching Openbox:
35e92e4c2a

Arch Linux and Debian patch Openbox to keep the old syntax (the one that
this commit aligns us with).
https://gitlab.archlinux.org/archlinux/packaging/packages/openbox/-/blob/main/debian-887908.patch?ref_type=heads
2023-12-09 22:19:23 +01:00
Johan Malm
aef39a238c theme: make button array definition easier to read
No functional change intended.
2023-12-09 22:19:23 +01:00
kyak
111b955b53
Implement key binds to control virtual outputs (#1287)
Add actions `VirtualOutputAdd` and `VirtualOutputRemove`
2023-12-09 09:01:11 +00:00
Andrew J. Hesford
e303281333 view: continue move-to-edge behavior to adjacent outputs 2023-12-09 08:50:32 +00:00