Commit graph

46 commits

Author SHA1 Message Date
ARDiDo
57cc72b49e OSD: fix stuck OSD when NumLock or CapsLock are activated 2021-12-18 10:33:56 -05:00
Johan Malm
238062a859 desktop: rename functions to increase consistency
...from
- desktop_raise_view()
- desktop_move_view_to_end_of_cycle()

to
- desktop_move_to_front()
- desktop_move_to_back()
2021-12-06 21:23:49 +00:00
John Lindgren
5da0ebda5a keyboard: Remove redundant damage_all_outputs() call
It was already called earlier in handle_compositor_keybindings().
2021-12-04 12:24:47 -05:00
John Lindgren
b72d524c50 keyboard: Allow canceling the Alt-Tab switcher with Escape
This is a standard feature in most window managers (OpenBox
included) that allow window-switching via Alt-Tab.
2021-12-04 12:24:47 -05: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
ARDiDo
aa9720f627 Add support for basic idle and idle inhibitor protocols 2021-11-22 21:58:07 +00:00
Joshua Ashton
98085b4546 keyboard: Fix cycle view taking precedence over TTY switch
I had a bug where cycle view would not close and I was unable to switch to a TTY as it was open.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-01 22:14:17 +00:00
Joshua Ashton
23b5eb294e keyboard: Fix handled check
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-01 22:14:17 +00:00
Joshua Ashton
95ce9e0264 keybind: Fix shift modifiers
Need to lower the syms for these to match!

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-21 18:15:42 +01:00
Joshua Ashton
846ccb9eb9 action: Implement shift to go backwards in OSD
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-10-18 17:28:34 +01:00
Johan Malm
9a290feeea desktop: simplify interface for view raise/focus
Split desktop_focus_view() into the following two functions:
  - desktop_focus_and_activate_view()
  - desktop_raise_view()

Always call view_set_activated() rather than using the private
set_activated(). This keeps the code cleaner and ensures
wlr_foreign_toplevel_handle_v1_set_activated() is called.
2021-10-16 19:44:54 +01:00
Johan Malm
606b6d946e Fix coding style, mostly whitespace 2021-10-15 20:52:36 +01:00
ARDiDo
326b4aebd1 keyboard repeat configuration 2021-10-10 11:34:48 +01:00
Johan Malm
ebb632419b *.c: add SPDX-License-Identifier 2021-09-24 21:45:48 +01:00
Johan Malm
639660883b keyboard.c: fix bug in 864746 (exit cycle-view with any modifier key)
Always call wlr_seat_keyboard_notify_modifiers() in
keyboard_modifiers_notify()
2021-09-20 22:42:03 +01:00
Daniel Barlow
a719a7681f don't send any key events to clients when osd onscreen 2021-08-28 20:37:34 +01:00
Daniel Barlow
c456e85e2f reindent for sircmpwn style 2021-08-28 19:05:19 +01:00
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
a9042e3cde Fix coding style following 824282dd 2021-08-25 19:59:49 +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
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
82e47ac1f5 Remove src/common/log.c
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
b19eecbbd4 keyboard: remove printf() debug message 2021-07-09 21:49:44 +01:00
Johan Malm
5f0c2d75b5 keyboard: catch C-A-F1 to C-A-F12 to switch tty
Fix issue #34 item 4
2021-07-01 17:53:47 +01:00
Johan Malm
54804fd3df Implement damage tracking 2021-01-09 22:51:20 +00:00
Johan Malm
ca24c215ee Use enum wl_keyboard_key_state
In support of wlroots commit 7693f61d (which is after v0.12)

s/WLR_KEY_RELEASED/WL_KEYBOARD_KEY_STATE_RELEASED/
s/WLR_KEY_PRESSED/WL_KEYBOARD_KEY_STATE_PRESSED/

This change is backwards compatible, albeit with some compiler warnings
2020-12-01 17:14:59 +00:00
Johan Malm
5d6143449f desktop: rename desktop_cycle_view() 2020-10-31 14:46:33 +00:00
Johan Malm
f752610e0b desktop: refactor desktop_focus_view() 2020-10-08 20:08:41 +01:00
Johan Malm
25829d122c Refactor seat.c, keyboard.c, cursor.c
Use wlr_keyboard_group
2020-10-02 21:20:12 +01:00
Johan Malm
96e05057a3 Update .clang-format
Align with wlroots style
2020-09-28 20:41:41 +01:00
Johan Malm
1721b339da Reload config+theme on SIGHUP 2020-09-25 19:42:40 +01:00
Johan Malm
745915c0ba action: refactor action() 2020-09-25 19:37:51 +01:00
Johan Malm
fb6f7d42a5 Add desktop.c
Move from view.c functions which work on server->views
2020-09-11 20:48:28 +01:00
Johan Malm
e99d0bb34e labwc.h: remove "extern struct server server" 2020-09-08 20:18:12 +01:00
Johan Malm
afaf78aa72 view: refactor view_next() 2020-09-07 19:47:11 +01:00
Johan Malm
bf3e4aa8d5 Add view_impl .map and .unmap
Hook up iconify button to view->impl->unmap
2020-09-03 21:05:00 +01:00
Johan Malm
2a17df0f8b Add log.c with info() and warn() 2020-08-12 19:37:44 +01:00
Johan Malm
7440919452 Add action.c 2020-06-18 20:18:01 +01:00
Johan Malm
1e342f8976 src/keyboard.c: handle list of keybinds 2020-06-17 21:21:28 +01:00
Johan Malm
49d2e029aa view.c: next_toplevel(): handle NULL pointer 2020-06-10 16:48:25 +01:00
Johan Malm
df93bc1841 src/keyboard.c: remove predefined A-F6 bind 2020-06-10 07:19:39 +01:00
Johan Malm
a6ac2a0439 Minor style fixes 2020-05-29 22:26:16 +01:00
Johan Malm
bc5accb089 Rename some {cursor,keyboard}_ functions 2020-05-29 22:10:41 +01:00
Johan Malm
aa294330ea Add keyboard.c 2020-05-29 21:44:50 +01:00