Compare commits

..

2 Commits

4 changed files with 14 additions and 0 deletions

View File

@@ -43,6 +43,16 @@ void send_client_to_next_monitor(const user_action_arg_t *arg) {
client_send_to_monitor(wm.client_focused, next_monitor);
}
void focus_next_monitor(const user_action_arg_t *arg) {
monitor_t *next_monitor = wm_get_next_monitor(wm.current_monitor);
if (next_monitor == wm.current_monitor) return;
wm_set_current_monitor(next_monitor, true);
if (wm.current_monitor->selected_tag->task_list) {
monitor_deal_focus(wm.current_monitor);
}
}
void spawn(const user_action_arg_t *arg) {
const char *cmd = (const char *)arg->ptr;
if (cmd == nullptr || strlen(cmd) == 0) return;

View File

@@ -53,6 +53,7 @@ void focus_client_in_same_tag(const user_action_arg_t *arg);
void select_tag_of_current_monitor(const user_action_arg_t *arg);
void send_client_to_tag(const user_action_arg_t *arg);
void send_client_to_next_monitor(const user_action_arg_t *arg);
void focus_next_monitor(const user_action_arg_t *arg);
void spawn(const user_action_arg_t *arg);
void quit(const user_action_arg_t *arg);
void raise_or_run(const user_action_arg_t *arg);

View File

@@ -103,6 +103,7 @@ static const keyboard_t key_list[] = {
{modifier_super, XK_o, send_client_to_next_monitor, {0}},
{modifier_super | modifier_control, XK_j, focus_next_monitor, {0}},
{modifier_super | modifier_control, XK_space, toggle_client_floating, {0}},
{modifier_super, XK_f, toggle_client_fullscreen, {0}},
{modifier_super, XK_m, toggle_client_maximize, {0}},

View File

@@ -1,6 +1,7 @@
#include "xcursor.h"
#include <stdint.h>
#include <xcb/xcb.h>
#include <xcb/xcb_cursor.h>
#include <xcb/xproto.h>
@@ -143,4 +144,5 @@ void xcursor_set_pointer_position(point_t point) {
xcb_window_t window = XCB_WINDOW_NONE;
xcb_window_t root = wm.screen->root;
xcb_warp_pointer(wm.xcb_conn, window, root, 0, 0, 1, 1, point.x, point.y);
xcb_flush(wm.xcb_conn);
}