Add key_modifier option in [client]
This commit is contained in:
parent
a6aa4edbd7
commit
7c4e9d8dbc
14
src/client.c
14
src/client.c
@ -14,8 +14,6 @@
|
||||
#include "screen.h"
|
||||
#include "mouse.h"
|
||||
|
||||
#define CLIENT_MOUSE_MOD Mod1Mask
|
||||
|
||||
#define CLIENT_RESIZE_DIR(D) \
|
||||
void uicb_client_resize_##D(Uicb cmd) \
|
||||
{ \
|
||||
@ -322,13 +320,13 @@ client_grabbuttons(struct client *c, bool focused)
|
||||
|
||||
while(i++ != Button5)
|
||||
{
|
||||
XGrabButton(W->dpy, i, CLIENT_MOUSE_MOD, c->win, False,
|
||||
XGrabButton(W->dpy, i, W->client_mod, c->win, False,
|
||||
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
||||
XGrabButton(W->dpy, i, CLIENT_MOUSE_MOD | LockMask, c->win, False,
|
||||
XGrabButton(W->dpy, i, W->client_mod | LockMask, c->win, False,
|
||||
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
||||
XGrabButton(W->dpy, i, CLIENT_MOUSE_MOD | W->numlockmask, c->win, False,
|
||||
XGrabButton(W->dpy, i, W->client_mod | W->numlockmask, c->win, False,
|
||||
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
||||
XGrabButton(W->dpy, i, CLIENT_MOUSE_MOD | LockMask | W->numlockmask, c->win, False,
|
||||
XGrabButton(W->dpy, i, W->client_mod | LockMask | W->numlockmask, c->win, False,
|
||||
ButtonMask, GrabModeAsync, GrabModeSync, None, None);
|
||||
}
|
||||
|
||||
@ -735,6 +733,7 @@ static void
|
||||
client_frame_new(struct client *c)
|
||||
{
|
||||
struct barwin *frameb;
|
||||
struct barwin *clientb;
|
||||
XSetWindowAttributes at =
|
||||
{
|
||||
.background_pixel = c->ncol.bg,
|
||||
@ -745,6 +744,7 @@ client_frame_new(struct client *c)
|
||||
|
||||
/* Use a fake barwin only to store mousebinds of frame win */
|
||||
frameb = barwin_new(W->root, 0, 0, 1, 1, 0, 0, false);
|
||||
clientb = barwin_new(W->root, 0, 0, 1, 1, 0, 0, false);
|
||||
|
||||
frameb->win =
|
||||
c->frame = XCreateWindow(W->dpy, W->root,
|
||||
@ -755,8 +755,10 @@ client_frame_new(struct client *c)
|
||||
CopyFromParent,
|
||||
(CWOverrideRedirect | CWBackPixmap
|
||||
| CWBackPixel | CWEventMask), &at);
|
||||
clientb->win = c->win;
|
||||
|
||||
frameb->mousebinds = W->tmp_head.client;
|
||||
clientb->mousebinds = W->tmp_head.client;
|
||||
|
||||
if(c->tbarw > c->border)
|
||||
{
|
||||
|
||||
@ -83,7 +83,6 @@ config_theme(void)
|
||||
t->tags_border_col = color_atoh(fetch_opt_first(ks[i], "#888888", "tags_border_color").str);
|
||||
t->tags_border_width = fetch_opt_first(ks[i], "0", "tags_border_width").num;
|
||||
|
||||
|
||||
/* status line */
|
||||
t->tags_n_sl = status_new_ctx(NULL, t);
|
||||
t->tags_s_sl = status_new_ctx(NULL, t);
|
||||
@ -207,6 +206,8 @@ config_client(void)
|
||||
/* [client] */
|
||||
sec = fetch_section_first(NULL, "client");
|
||||
|
||||
W->client_mod = modkey_keysym(fetch_opt_first(sec, "Super", "key_modifier").str);
|
||||
|
||||
/* [mouse] */
|
||||
/* for client frame AND titlebar */
|
||||
if((mb = fetch_section(sec, "mouse")))
|
||||
|
||||
@ -305,6 +305,7 @@ struct wmfs
|
||||
int xscreen, xdepth;
|
||||
int xmaxw, xmaxh;
|
||||
int nscreen;
|
||||
unsigned int client_mod;
|
||||
Flags numlockmask;
|
||||
#define WMFS_SCAN 0x01
|
||||
#define WMFS_RUNNING 0x02
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user