Optionally don't cover dragbar when maximising (patch by Pietro Cerutti).
SVN revision: 37833
This commit is contained in:
parent
c94fbff3d3
commit
aafb7aa775
3
AUTHORS
3
AUTHORS
|
@ -254,6 +254,9 @@ Dan Sinclair <zero@perplexity.org>, and others
|
|||
Tristan D. <trinine@free.fr>
|
||||
French translation updates
|
||||
|
||||
Pietro Cerutti <gahr@freebsd.org>
|
||||
"alone" window operation
|
||||
Optionally don't cover dragbar when maximising
|
||||
|
||||
And others whose names we probably forgot to add (email us and we'll put you
|
||||
in here)
|
||||
|
|
1
src/E.h
1
src/E.h
|
@ -215,6 +215,7 @@ typedef struct {
|
|||
char avoid_server_grab;
|
||||
char update_while_moving;
|
||||
char enable_sync_request;
|
||||
char dragbar_nocover;
|
||||
} movres;
|
||||
struct {
|
||||
int movres;
|
||||
|
|
|
@ -158,6 +158,7 @@ static const CfgItem MiscCfgItems[] = {
|
|||
CFG_ITEM_BOOL(Conf, movres.avoid_server_grab, 1),
|
||||
CFG_ITEM_BOOL(Conf, movres.update_while_moving, 0),
|
||||
CFG_ITEM_BOOL(Conf, movres.enable_sync_request, 0),
|
||||
CFG_ITEM_BOOL(Conf, movres.dragbar_nocover, 0),
|
||||
|
||||
CFG_ITEM_INT(Conf, opacity.menus, 85),
|
||||
CFG_ITEM_INT(Conf, opacity.movres, 60),
|
||||
|
|
|
@ -29,6 +29,7 @@ static int tmp_move;
|
|||
static int tmp_resize;
|
||||
static int tmp_geominfo;
|
||||
static int tmp_maximize;
|
||||
static char tmp_dragbar_nocover;
|
||||
static char tmp_avoid_server_grab;
|
||||
static char tmp_update_while_moving;
|
||||
static char tmp_sync_request;
|
||||
|
@ -45,6 +46,7 @@ CB_ConfigureMoveResize(Dialog * d __UNUSED__, int val, void *data __UNUSED__)
|
|||
Conf.movres.avoid_server_grab = tmp_avoid_server_grab;
|
||||
Conf.movres.update_while_moving = tmp_update_while_moving;
|
||||
Conf.movres.enable_sync_request = tmp_sync_request;
|
||||
Conf.movres.dragbar_nocover = tmp_dragbar_nocover;
|
||||
}
|
||||
autosave();
|
||||
}
|
||||
|
@ -61,6 +63,7 @@ _DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
|
|||
tmp_avoid_server_grab = Conf.movres.avoid_server_grab;
|
||||
tmp_update_while_moving = Conf.movres.update_while_moving;
|
||||
tmp_sync_request = Conf.movres.enable_sync_request;
|
||||
tmp_dragbar_nocover = Conf.movres.dragbar_nocover;
|
||||
|
||||
DialogItemTableSetOptions(table, 2, 0, 0, 0);
|
||||
|
||||
|
@ -206,6 +209,11 @@ _DlgFillMoveResize(Dialog * d __UNUSED__, DItem * table, void *data __UNUSED__)
|
|||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetText(di, _("Synchronize move/resize with application"));
|
||||
DialogItemCheckButtonSetPtr(di, &tmp_sync_request);
|
||||
|
||||
di = DialogAddItem(table, DITEM_CHECKBUTTON);
|
||||
DialogItemSetColSpan(di, 2);
|
||||
DialogItemSetText(di, _("Do not cover dragbar"));
|
||||
DialogItemCheckButtonSetPtr(di, &tmp_dragbar_nocover);
|
||||
}
|
||||
|
||||
const DialogDef DlgMoveResize = {
|
||||
|
|
30
src/size.c
30
src/size.c
|
@ -102,6 +102,36 @@ MaxSizeHV(EWin * ewin, const char *resize_type, int hor, int ver)
|
|||
x2 += x1;
|
||||
y2 += y1;
|
||||
|
||||
if (Conf.movres.dragbar_nocover && type != MAX_ABSOLUTE)
|
||||
{
|
||||
/* Leave room for the dragbar */
|
||||
switch (Conf.desks.dragdir)
|
||||
{
|
||||
case 0: /* left */
|
||||
if (x1 < Conf.desks.dragbar_width)
|
||||
x1 = Conf.desks.dragbar_width;
|
||||
break;
|
||||
|
||||
case 1: /* right */
|
||||
if (x2 > WinGetW(VROOT) - Conf.desks.dragbar_width)
|
||||
x2 = WinGetW(VROOT) - Conf.desks.dragbar_width;
|
||||
break;
|
||||
|
||||
case 2: /* top */
|
||||
if (y1 < Conf.desks.dragbar_width)
|
||||
y1 = Conf.desks.dragbar_width;
|
||||
break;
|
||||
|
||||
case 3: /* bottom */
|
||||
if (y2 > WinGetH(VROOT) - Conf.desks.dragbar_width)
|
||||
y2 = WinGetH(VROOT) - Conf.desks.dragbar_width;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (type == MAX_ABSOLUTE)
|
||||
{
|
||||
/* Simply ignore all windows */
|
||||
|
|
Loading…
Reference in New Issue