Add dialog option to select non-grabbing move/resize modes.
SVN revision: 30756
This commit is contained in:
parent
929d220cbb
commit
9eec06491e
2
src/E.h
2
src/E.h
|
@ -321,7 +321,7 @@ typedef struct
|
||||||
int mode_resize;
|
int mode_resize;
|
||||||
int mode_info;
|
int mode_info;
|
||||||
unsigned int color;
|
unsigned int color;
|
||||||
char old_mode;
|
char avoid_server_grab;
|
||||||
char update_while_moving;
|
char update_while_moving;
|
||||||
char enable_sync_request;
|
char enable_sync_request;
|
||||||
} movres;
|
} movres;
|
||||||
|
|
|
@ -323,7 +323,7 @@ DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h,
|
||||||
|
|
||||||
EwinBorderGetSize(ewin, &bl, &br, &bt, &bb);
|
EwinBorderGetSize(ewin, &bl, &br, &bt, &bb);
|
||||||
|
|
||||||
if (md <= 2 && !Conf.movres.old_mode)
|
if (md <= 2 && Conf.movres.avoid_server_grab)
|
||||||
{
|
{
|
||||||
static ShapeWin *shape_win = NULL;
|
static ShapeWin *shape_win = NULL;
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ static const CfgItem MiscCfgItems[] = {
|
||||||
CFG_ITEM_INT(Conf, movres.mode_resize, 2),
|
CFG_ITEM_INT(Conf, movres.mode_resize, 2),
|
||||||
CFG_ITEM_INT(Conf, movres.mode_info, 1),
|
CFG_ITEM_INT(Conf, movres.mode_info, 1),
|
||||||
CFG_ITEM_HEX(Conf, movres.color, 0x00ff0000),
|
CFG_ITEM_HEX(Conf, movres.color, 0x00ff0000),
|
||||||
CFG_ITEM_INT(Conf, movres.old_mode, 0),
|
CFG_ITEM_INT(Conf, movres.avoid_server_grab, 1),
|
||||||
CFG_ITEM_BOOL(Conf, movres.update_while_moving, 0),
|
CFG_ITEM_BOOL(Conf, movres.update_while_moving, 0),
|
||||||
CFG_ITEM_BOOL(Conf, movres.enable_sync_request, 0),
|
CFG_ITEM_BOOL(Conf, movres.enable_sync_request, 0),
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ _NeedServerGrab(int mode)
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (mode <= 2)
|
if (mode <= 2)
|
||||||
return Conf.movres.old_mode;
|
return !Conf.movres.avoid_server_grab;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
static int tmp_move;
|
static int tmp_move;
|
||||||
static int tmp_resize;
|
static int tmp_resize;
|
||||||
static int tmp_geominfo;
|
static int tmp_geominfo;
|
||||||
|
static char tmp_avoid_server_grab;
|
||||||
static char tmp_update_while_moving;
|
static char tmp_update_while_moving;
|
||||||
static char tmp_sync_request;
|
static char tmp_sync_request;
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ CB_ConfigureMoveResize(Dialog * d __UNUSED__, int val, void *data __UNUSED__)
|
||||||
Conf.movres.mode_move = tmp_move;
|
Conf.movres.mode_move = tmp_move;
|
||||||
Conf.movres.mode_resize = tmp_resize;
|
Conf.movres.mode_resize = tmp_resize;
|
||||||
Conf.movres.mode_info = tmp_geominfo;
|
Conf.movres.mode_info = tmp_geominfo;
|
||||||
|
Conf.movres.avoid_server_grab = tmp_avoid_server_grab;
|
||||||
Conf.movres.update_while_moving = tmp_update_while_moving;
|
Conf.movres.update_while_moving = tmp_update_while_moving;
|
||||||
Conf.movres.enable_sync_request = tmp_sync_request;
|
Conf.movres.enable_sync_request = tmp_sync_request;
|
||||||
}
|
}
|
||||||
|
@ -53,6 +55,7 @@ _DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
|
||||||
tmp_move = Conf.movres.mode_move;
|
tmp_move = Conf.movres.mode_move;
|
||||||
tmp_resize = Conf.movres.mode_resize;
|
tmp_resize = Conf.movres.mode_resize;
|
||||||
tmp_geominfo = Conf.movres.mode_info;
|
tmp_geominfo = Conf.movres.mode_info;
|
||||||
|
tmp_avoid_server_grab = Conf.movres.avoid_server_grab;
|
||||||
tmp_update_while_moving = Conf.movres.update_while_moving;
|
tmp_update_while_moving = Conf.movres.update_while_moving;
|
||||||
tmp_sync_request = Conf.movres.enable_sync_request;
|
tmp_sync_request = Conf.movres.enable_sync_request;
|
||||||
|
|
||||||
|
@ -127,6 +130,11 @@ _DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
|
||||||
|
|
||||||
di = DialogAddItem(table, DITEM_NONE);
|
di = DialogAddItem(table, DITEM_NONE);
|
||||||
|
|
||||||
|
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||||
|
DialogItemSetColSpan(di, 2);
|
||||||
|
DialogItemSetText(di, _("Avoid server grab"));
|
||||||
|
DialogItemCheckButtonSetPtr(di, &tmp_avoid_server_grab);
|
||||||
|
|
||||||
di = DialogAddItem(table, DITEM_SEPARATOR);
|
di = DialogAddItem(table, DITEM_SEPARATOR);
|
||||||
DialogItemSetColSpan(di, 2);
|
DialogItemSetColSpan(di, 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue