mirror of
https://github.com/labwc/labwc.git
synced 2026-02-25 01:40:28 -05:00
workspaces: Wire up workspaces
This commit is contained in:
parent
ae2fa1571b
commit
8c5157a098
7 changed files with 134 additions and 68 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "buffer.h"
|
||||
#include "key-state.h"
|
||||
#include "labwc.h"
|
||||
#include "workspaces.h"
|
||||
|
||||
static void
|
||||
change_vt(struct server *server, unsigned int vt)
|
||||
|
|
@ -38,17 +39,23 @@ keyboard_modifiers_notify(struct wl_listener *listener, void *data)
|
|||
struct seat *seat = wl_container_of(listener, seat, keyboard_modifiers);
|
||||
struct server *server = seat->server;
|
||||
|
||||
if (server->cycle_view) {
|
||||
if (server->cycle_view || seat->workspace_osd_shown_by_modifier) {
|
||||
struct wlr_keyboard_key_event *event = data;
|
||||
struct wlr_keyboard *keyboard = &seat->keyboard_group->keyboard;
|
||||
|
||||
if (event->state == WL_KEYBOARD_KEY_STATE_RELEASED
|
||||
&& !keyboard_any_modifiers_pressed(keyboard)) {
|
||||
/* end cycle */
|
||||
desktop_focus_and_activate_view(&server->seat,
|
||||
server->cycle_view);
|
||||
desktop_move_to_front(server->cycle_view);
|
||||
server->cycle_view = NULL;
|
||||
osd_finish(server);
|
||||
if (server->cycle_view) {
|
||||
/* end cycle */
|
||||
desktop_focus_and_activate_view(&server->seat,
|
||||
server->cycle_view);
|
||||
desktop_move_to_front(server->cycle_view);
|
||||
server->cycle_view = NULL;
|
||||
osd_finish(server);
|
||||
}
|
||||
if (seat->workspace_osd_shown_by_modifier) {
|
||||
workspaces_osd_hide(seat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue