Consolatis
ccfcd04625
Revert "Fix dynamic output based scaling for menu and SSD"
...
As it turns out the reason for the workaround was a bug
in wlroots which got fixed in the meantime.
So to keep things simple just revert the workaround and
depend on the wlroots fix instead.
To update the wlroots subproject use
meson subprojects update wlroots
This reverts commit e87aa19066 .
2022-05-30 21:27:33 +02:00
Consolatis
e87aa19066
Fix dynamic output based scaling for menu and SSD
...
wlr_scene_buffers need an additional wlr_scene_buffer_set_source_box()
to be scaled correctly by wlroots based on the output scale.
With this commit the buffers are now scaled correctly but, especially
on higher scale factors, may be a bit blurry.
In the future we likely want a dynamic font label generator based
on the maximal scale of all the outputs the specific buffer is currently on.
Some inspiration for that could be
https://github.com/Nefsen402/sway/blob/scene-graph/sway/sway_text_buffer.c
Fixes #348
2022-05-29 22:10:00 +02:00
Consolatis
bda48da68d
Deal with font_buffer_create() failures
2022-05-26 22:19:56 +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
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
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
Consolatis
6b4d9b9383
Add ToggleAlwaysOnTop action
2022-04-09 17:18:39 +01:00
Johan Malm
5b34c81768
Fix trivial coding style breaches
2022-04-04 20:53:36 +01:00
Consolatis
420c0712f8
menu.c: Handle keybinding based Reconfigure while menu is shown
2022-03-16 18:21:32 +00:00
Consolatis
428423cfa9
menu.c: Handle out of screen submenus
...
Fixes #276
2022-03-16 18:21:32 +00:00
Consolatis
8444ba4075
Convert menu to node_descriptors
2022-03-03 17:49:54 +00:00
Consolatis
00ff00d9f9
[style] use __func__ in log message
2022-02-24 21:17:51 +00:00
Consolatis
953e8a4f9d
[style] rename action() to actions_run()
2022-02-24 21:17:51 +00:00
Consolatis
f2d40a8d69
Scene Menu
2022-02-23 21:47:01 +00:00
Consolatis
044388a5cd
Prepare to move from wlr_texture to lab_data_buffer
2022-02-23 21:47:01 +00:00
Consolatis
759b26b5c1
Add window menu
2022-01-26 06:17:41 +00: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
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
Joshua Ashton
d568c60003
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>
2021-12-03 18:13:30 +00:00
bi4k8
031ced85ef
implement Resize as an action
...
this requires action() to know the resize edges to use, so thread them through
2021-12-01 22:45:20 +00:00
Johan Malm
dd1663e627
theme: add menu.overlap.{x,y}
2021-11-08 17:36:39 +00:00
Johan Malm
cd31283ba3
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>
2021-11-08 17:20:37 +00:00
Johan Malm
b878db57a7
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>
2021-11-02 18:31:19 +00:00
Johan Malm
b967592289
Fix coding style
2021-09-24 22:14:04 +01:00
Johan Malm
ebb632419b
*.c: add SPDX-License-Identifier
2021-09-24 21:45:48 +01:00
Johan Malm
a668f6f73d
font: font_texture_create() support font size argument
2021-08-20 20:20:49 +01:00
Johan Malm
9a9cd609f6
menu: fix breakage caused by f857aea8
2021-08-09 17:28:39 +01:00
Johan Malm
5ecf0e1e7e
Make font_texture_create() more generic
...
Move font_texture_create() to font.c so it can be used for purposes other
than rendering the menu, for example server side decoration.
Refactor menu.c and menu.h to use this more generic font_texture_create()
2021-08-07 08:35:46 +01:00
Johan Malm
82e47ac1f5
Remove src/common/log.c
...
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
20fd8f59a7
Remove info() and die()
2021-07-22 21:30:17 +01:00
Johan Malm
6ad8252de9
menu/theme: use wlr_texture_destroy()
2021-07-01 19:21:09 +01:00
Johan Malm
e05a3c5f65
cairo: Replace <cairo/cairo.h> by <cairo.h>
...
See sway@d45623c2
2021-06-26 18:28:27 +01:00
Jan Beich
c9023dd2c6
menu,xbm: chase swaywm/wlroots@27fba3df43
...
$ labwc
[...]
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.063 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0
00:00:00.064 [render/gles2/texture.c:162] Unsupported pixel format 0x0
Based on 66343839b1
2021-03-13 23:23:33 +00:00
Johan Malm
de88b69d62
mv theme.c ..
2021-02-21 22:18:34 +00:00
Johan Malm
1b263e1f67
Un-global theme variable
2021-02-21 21:54:40 +00:00
Johan Malm
6cdf3d68f3
menu: minor refactoring
2021-02-19 23:31:30 +00:00
Johan Malm
f0d8eb0a60
menu: reload on SIGHUP
2021-02-19 23:05:14 +00:00
Johan Malm
855f21b1b3
menu.c: parse menu.xml root-menu
2021-02-17 20:38:16 +00:00
Johan Malm
bc04f50d14
Add basic menu theme options
2021-02-16 20:43:20 +00:00
Johan Malm
d39b158cec
menu: add menu_finish()
2020-10-22 19:43:27 +01:00
Johan Malm
266f625306
menu: vertically center-align items
2020-10-21 20:32:08 +01:00
Johan Malm
dc5d1ab976
Support a very simple root-menu
2020-10-19 22:14:17 +01:00