From 0f0678e1c5cb4cd8fbbb2b50b594e14941e612e5 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Fri, 24 Apr 2009 22:36:51 +0200 Subject: [PATCH] Conf: Add option move_transparent in misc {}. --- src/config.c | 2 ++ src/config_struct.h | 1 + src/mouse.c | 6 +++++- src/structs.h | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 054b413..185f633 100644 --- a/src/config.c +++ b/src/config.c @@ -129,6 +129,8 @@ conf_misc_section(cfg_t *cfg_m) conf.raisefocus = cfg_getbool(cfg_m, "raisefocus"); conf.raiseswitch = cfg_getbool(cfg_m, "raiseswitch"); conf.resize_transparent = cfg_getbool(cfg_m, "resize_transparent"); + conf.move_transparent = cfg_getbool(cfg_m, "move_transparent"); + return; } diff --git a/src/config_struct.h b/src/config_struct.h index 04a6719..cb489c5 100644 --- a/src/config_struct.h +++ b/src/config_struct.h @@ -43,6 +43,7 @@ cfg_opt_t misc_opts[] = CFG_BOOL("raisefocus", cfg_false, CFGF_NONE), CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE), CFG_BOOL("resize_transparent", cfg_false, CFGF_NONE), + CFG_BOOL("move_transparent", cfg_false, CFGF_NONE), CFG_END() }; diff --git a/src/mouse.c b/src/mouse.c index 9cf86e9..ed8aa49 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -99,7 +99,8 @@ mouse_move(Client *c) geo.x = (ocx + (ev.xmotion.x - mx)); geo.y = (ocy + (ev.xmotion.y - my)); - client_moveresize(c, geo, False); + if(!conf.move_transparent) + client_moveresize(c, geo, False); } } else if(ev.type == MapRequest @@ -109,6 +110,9 @@ mouse_move(Client *c) } while(ev.type != ButtonRelease); + if(!c->tile) + client_moveresize(c, geo, False); + client_update_attributes(c); XUngrabPointer(dpy, CurrentTime); diff --git a/src/structs.h b/src/structs.h index 1e9d557..5080806 100644 --- a/src/structs.h +++ b/src/structs.h @@ -273,6 +273,7 @@ typedef struct Bool raisefocus; Bool raiseswitch; Bool resize_transparent; + Bool move_transparent; struct { /*