Commit graph

386 commits

Author SHA1 Message Date
Daniel Barlow
431da3ed0e Merge branch 'master' of github.com:johanmalm/labwc into dehardcode-window-cycle-key 2021-08-28 18:52:45 +01:00
Daniel Barlow
864746e573 fix cycle_view for bindings other than Alt_L
Change the code that detects when to stop cycling the view,
so that instead of looking for the left Alt key release it
looks for all modifiers released (thus. will work whether you
have this action bound to Alt-Tab, C-Tab, Meta-Tab, etc)

To do this we move the test from keyboard_key.notify to
the later signal keyboard_modifiers.notify, because the xkb_state
has been updated by then and the modifier state will be
accurate
2021-08-28 18:42:18 +01:00
Johan Malm
ea3ea49783 Fix more coding style violations 2021-08-25 20:45:39 +01:00
Johan Malm
a9042e3cde Fix coding style following 824282dd 2021-08-25 19:59:49 +01:00
Johan Malm
824282dd2e
Merge pull request #54 from telent/lockdown
implement input_inhibit protocol, needed for swaylock
2021-08-24 21:56:13 +01:00
Johan Malm
7bfe350f25 view: fix impl->set_fullscreen() argument bug 2021-08-24 21:53:20 +01:00
Daniel Barlow
ab9838888d implement commented-out bit in seat_disinhibit_input 2021-08-24 21:24:08 +01:00
Johan Malm
645a8e46a6 Support fullscreen mode (issue #53) 2021-08-23 22:05:30 +01:00
Daniel Barlow
eb2d0918ba cleanup per PR review comments 2021-08-23 20:33:42 +01:00
Daniel Barlow
39b1d92f9b implement input_inhibit protocol, needed for swaylock
this is in "it appears to work" state, though I blindly copy-pasted a little
more code than I'm happy with, so might benefit from a review
2021-08-22 21:30:42 +01:00
Johan Malm
5563cd1b20 foreign: handle output error gracefully 2021-08-22 19:14:15 +01:00
Johan Malm
b7573c8d36 rcxml: load default keybinds on <keyboard><default />
This is an addition to the openbox specification and provides a way to
keep config files simpler whilst allowing user-specific keybinds.

docs/rc.xml shows a simple config file with <default />
docs/rc.xml.full shows the full config
2021-08-22 19:09:31 +01:00
Johan Malm
93244cfbe1 rcxml: add some default keybinds
super-return - alacritty
alt-F4       - close window
super-a      - toggle maximize
alt-arrow    - move window to edge
2021-08-22 17:00:22 +01:00
Johan Malm
0aee42473b view: update title width when resizing view 2021-08-22 14:35:34 +01:00
Johan Malm
a6eb29ad33 config: add <core><gap>
Specify the distance in pixels between views and output edges when using
movement actions such as MoveToEdge
2021-08-22 14:32:19 +01:00
Johan Malm
5cf4539827 output: fallback to other output modes if preferred mode fails
See sway@4cdc4ac6

Sometimes the preferred mode is not available due to hardware
constraints. In these cases it is better to fallback to lower modes than
to end up with a black screen.
2021-08-22 14:14:50 +01:00
Johan Malm
8c96c65018 ssd: refactor in preparation for making ssd_visible_box() private
Prepare to move code from output/render functions to ssd. We want
rendering functions to just render, not calculate decoration geometry
and such like.
2021-08-22 14:12:05 +01:00
Johan Malm
5f01c49b72 ssd: refactor and position title nearer left hand edge
Put title deco at the end of linked list to render it on top of corner
edges.
2021-08-22 14:06:11 +01:00
Johan Malm
ec5603dbd0
Merge pull request #49 from telent/primary-selection-gtk-workaround
workaround Gtk primary selection bug by changing order of globals
2021-08-21 11:38:22 +01:00
Johan Malm
c13a520673 ssd: handle font texture creation when view->width not yet set 2021-08-21 11:16:15 +01:00
Daniel Barlow
44082ad80a workaround Gtk primary selection bug by changing order of globals
This makes primary selections work at least with Emacs (pgtk backend)
and Firefox. I haven't tested others.
2021-08-21 00:17:15 +01:00
Johan Malm
3990018bb9 config: support setting menu item font
In rc.xml, support

<font place="MenuItem">
  <name></name>
  <size></size>
</font>
2021-08-20 20:27:52 +01:00
Johan Malm
a668f6f73d font: font_texture_create() support font size argument 2021-08-20 20:20:49 +01:00
Daniel Barlow
804384368c add support for primary selection 2021-08-18 23:42:56 +01:00
Johan Malm
3efcfaf145 view: scale correctly in view_maximize() 2021-08-17 07:25:57 +01:00
Johan Malm
620cd84a8a view: apply output scale in view_center() 2021-08-17 07:24:27 +01:00
Johan Malm
9e2af19caf layer-shell: replace close() with destroy()
Update for the wlroots breaking change in
https://github.com/swaywm/wlroots/pull/3108
2021-08-16 07:18:08 +01:00
Johan Malm
77ade08158 osd: support 'alt-tab' on screen display
The osd window shows title, app_id/class and shell of all views that can
be cycled between.
2021-08-16 07:16:56 +01:00
Johan Malm
86c384b227 server: update view->margin after theme change 2021-08-11 21:04:22 +01:00
Johan Malm
dff6dba54b theme: support different colored buttons
Add the following theme keys:

- window.active.button.iconify.unpressed.image.color
- window.active.button.max.unpressed.image.color
- window.active.button.close.unpressed.image.color
- window.inactive.button.iconify.unpressed.image.color
- window.inactive.button.max.unpressed.image.color
- window.inactive.button.close.unpressed.image.color

As far as I can tell, the openbox documentation does not mention the
entries listed above, but openbox does support them and some themes
do use them.
2021-08-11 20:58:35 +01:00
Johan Malm
9a9cd609f6 menu: fix breakage caused by f857aea8 2021-08-09 17:28:39 +01:00
Johan Malm
f857aea8f4 ssd: add application title to title bar 2021-08-07 09:35:53 +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
9cf0608aba foreign: handle minimize request 2021-08-05 13:00:34 +01:00
Johan Malm
b4722d988e foreign: handle maximize request 2021-08-05 12:52:42 +01:00
Johan Malm
042ea266a5 Add simple foreign toplevel implementation 2021-08-05 12:18:10 +01:00
Johan Malm
7dc4ae36ca view: initialise x+y variables to handle edge case 2021-08-04 21:43:07 +01:00
Johan Malm
6a5deb628e cursor: handle double click on title 2021-08-02 17:30:34 +01:00
Johan Malm
526ab1ae75 view: add view_toggle_maximize() 2021-08-02 16:49:41 +01:00
Johan Malm
d6376808b8 server: add missing header file 2021-08-02 16:45:49 +01:00
Johan Malm
2aeb4ee643 server: update ssd on re-configure 2021-07-30 19:42:56 +01:00
Johan Malm
fc542e6da1 cursor: simplify process_cursor_motion()
...by using wlr_xcursor_get_resize_name() instead of handling each
'resize_edge' case.
2021-07-30 14:26:54 +01:00
Johan Malm
1dc3059707 ssd: add support for interacting with bottom corners 2021-07-26 20:37:36 +01:00
Johan Malm
399322052b ssd: add ssd_interactive_box()
...which is used by desktop_view_at() and ssd_at() to determine which
decoration part is under the cursor.

ssd_interactive_box() allows deocoration parts to extend outside the
visible regions, and therefore supports a wider 'resize-edges' area than
the border itself.
2021-07-26 20:06:52 +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
22f5073ebd xdg: use "usable_area" when positioning view 2021-07-21 22:04:54 +01:00
Johan Malm
0eac290d54 Handle alt + cursor button outside view 2021-07-21 19:27:11 +01:00
Johan Malm
2b9c6a503c view.c: assign struct rather than using memcpy
Suggested-by: @xerpi
2021-07-21 19:25:34 +01:00
Johan Malm
7bd2576138 theme: reset theme values on reconfigure 2021-07-20 21:27:41 +01:00