Remove opaquemove option. Always use wire frame.
This commit is contained in:
parent
94f29d39ab
commit
eb039dc872
@ -508,7 +508,7 @@ titlebuttons and bindings. This option should only be used if the startup
|
|||||||
file contains a completely new set of bindings and definitions.
|
file contains a completely new set of bindings and definitions.
|
||||||
.IP "\fBNoGrabServer\fP" 8
|
.IP "\fBNoGrabServer\fP" 8
|
||||||
This variable indicates that \fItwmruined\fP should not grab the server
|
This variable indicates that \fItwmruined\fP should not grab the server
|
||||||
when popping up menus and moving opaque windows.
|
when popping up menus.
|
||||||
.IP "\fBNoMenuShadows\fP" 8
|
.IP "\fBNoMenuShadows\fP" 8
|
||||||
This variable indicates that menus should not have drop shadows drawn behind
|
This variable indicates that menus should not have drop shadows drawn behind
|
||||||
them. This is typically used with slower servers since it speeds up menu
|
them. This is typically used with slower servers since it speeds up menu
|
||||||
@ -550,11 +550,6 @@ the pointer is moved quickly and \fItwmruined\fP is slow to respond, input can b
|
|||||||
directed to the old window instead of the new. This option is typically
|
directed to the old window instead of the new. This option is typically
|
||||||
used to prevent this ``input lag'' and to
|
used to prevent this ``input lag'' and to
|
||||||
work around bugs in older applications that have problems with focus events.
|
work around bugs in older applications that have problems with focus events.
|
||||||
.IP "\fBOpaqueMove\fP" 8
|
|
||||||
This variable indicates that the \fBf.move\fP function should actually move
|
|
||||||
the window instead of just an outline so that the user can immediately see
|
|
||||||
what the window will look like in the new position. This option is typically
|
|
||||||
used on fast displays (particularly if \fBNoGrabServer\fP is set).
|
|
||||||
.IP "\fBPriority\fP \fIpriority\fP" 8
|
.IP "\fBPriority\fP \fIpriority\fP" 8
|
||||||
This variable sets \fItwmruined\fP's priority. \fIpriority\fP should be an
|
This variable sets \fItwmruined\fP's priority. \fIpriority\fP should be an
|
||||||
unquoted, signed number (e.g. 999). This variable has an effect only
|
unquoted, signed number (e.g. 999). This variable has an effect only
|
||||||
@ -881,8 +876,7 @@ This function lowers the selected window.
|
|||||||
This function invokes the menu specified by the argument \fIstring\fP.
|
This function invokes the menu specified by the argument \fIstring\fP.
|
||||||
Cascaded menus may be built by nesting calls to \fBf.menu\fP.
|
Cascaded menus may be built by nesting calls to \fBf.menu\fP.
|
||||||
.IP "\fBf.move\fP" 8
|
.IP "\fBf.move\fP" 8
|
||||||
This function drags an outline of the selected window (or the window itself
|
This function drags an outline of the selected window until the invoking pointer button
|
||||||
if the \fBOpaqueMove\fP variable is set) until the invoking pointer button
|
|
||||||
is released. Double clicking within the number of milliseconds given by
|
is released. Double clicking within the number of milliseconds given by
|
||||||
\fBConstrainedMoveTime\fP warps
|
\fBConstrainedMoveTime\fP warps
|
||||||
the pointer to the center of the window and
|
the pointer to the center of the window and
|
||||||
|
16
src/events.c
16
src/events.c
@ -1520,13 +1520,10 @@ HandleButtonRelease(void)
|
|||||||
else
|
else
|
||||||
XMoveWindow (dpy, DragWindow, xl, yt);
|
XMoveWindow (dpy, DragWindow, xl, yt);
|
||||||
|
|
||||||
if (!Scr->NoRaiseMove && !Scr->OpaqueMove) /* opaque already did */
|
if (!Scr->NoRaiseMove)
|
||||||
XRaiseWindow(dpy, DragWindow);
|
XRaiseWindow(dpy, DragWindow);
|
||||||
|
|
||||||
if (!Scr->OpaqueMove)
|
UninstallRootColormap();
|
||||||
UninstallRootColormap();
|
|
||||||
else
|
|
||||||
XSync(dpy, 0);
|
|
||||||
|
|
||||||
if (Scr->NumAutoRaises) {
|
if (Scr->NumAutoRaises) {
|
||||||
enter_flag = TRUE;
|
enter_flag = TRUE;
|
||||||
@ -1669,22 +1666,17 @@ HandleButtonPress(void)
|
|||||||
|
|
||||||
if (ButtonPressed != -1 && !InfoLines) /* want menus if we have info box */
|
if (ButtonPressed != -1 && !InfoLines) /* want menus if we have info box */
|
||||||
{
|
{
|
||||||
/* we got another butt press in addition to one still held
|
/* we got another button press in addition to one still held
|
||||||
* down, we need to cancel the operation we were doing
|
* down, we need to cancel the operation we were doing
|
||||||
*/
|
*/
|
||||||
Cancel = TRUE;
|
Cancel = TRUE;
|
||||||
CurrentDragX = origDragX;
|
CurrentDragX = origDragX;
|
||||||
CurrentDragY = origDragY;
|
CurrentDragY = origDragY;
|
||||||
if (!menuFromFrameOrWindowOrTitlebar) {
|
if (!menuFromFrameOrWindowOrTitlebar) {
|
||||||
if (Scr->OpaqueMove && DragWindow != None) {
|
|
||||||
XMoveWindow (dpy, DragWindow, origDragX, origDragY);
|
|
||||||
} else {
|
|
||||||
MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
|
MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
XUnmapWindow(dpy, Scr->SizeWindow);
|
XUnmapWindow(dpy, Scr->SizeWindow);
|
||||||
if (!Scr->OpaqueMove)
|
UninstallRootColormap();
|
||||||
UninstallRootColormap();
|
|
||||||
ResizeWindow = None;
|
ResizeWindow = None;
|
||||||
DragWindow = None;
|
DragWindow = None;
|
||||||
cur = LeftButt;
|
cur = LeftButt;
|
||||||
|
86
src/menus.c
86
src/menus.c
@ -1474,9 +1474,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
EventHandler[EnterNotify] = HandleUnknown;
|
EventHandler[EnterNotify] = HandleUnknown;
|
||||||
EventHandler[LeaveNotify] = HandleUnknown;
|
EventHandler[LeaveNotify] = HandleUnknown;
|
||||||
|
|
||||||
if (!Scr->NoGrabServer || !Scr->OpaqueMove) {
|
XGrabServer(dpy);
|
||||||
XGrabServer(dpy);
|
|
||||||
}
|
|
||||||
XGrabPointer(dpy, eventp->xbutton.root, True,
|
XGrabPointer(dpy, eventp->xbutton.root, True,
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
ButtonMotionMask | PointerMotionMask, /* PointerMotionHintMask */
|
ButtonMotionMask | PointerMotionMask, /* PointerMotionHintMask */
|
||||||
@ -1540,32 +1538,29 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
}
|
}
|
||||||
last_time = eventp->xbutton.time;
|
last_time = eventp->xbutton.time;
|
||||||
|
|
||||||
if (!Scr->OpaqueMove)
|
InstallRootColormap();
|
||||||
|
if (!Scr->MoveDelta)
|
||||||
{
|
{
|
||||||
InstallRootColormap();
|
/*
|
||||||
if (!Scr->MoveDelta)
|
* Draw initial outline. This was previously done the
|
||||||
{
|
* first time though the outer loop by dropping out of
|
||||||
/*
|
* the XCheckMaskEvent inner loop down to one of the
|
||||||
* Draw initial outline. This was previously done the
|
* MoveOutline's below.
|
||||||
* first time though the outer loop by dropping out of
|
*/
|
||||||
* the XCheckMaskEvent inner loop down to one of the
|
MoveOutline(rootw,
|
||||||
* MoveOutline's below.
|
origDragX - JunkBW, origDragY - JunkBW,
|
||||||
*/
|
DragWidth + 2 * JunkBW, DragHeight + 2 * JunkBW,
|
||||||
MoveOutline(rootw,
|
tmp_win->frame_bw,
|
||||||
origDragX - JunkBW, origDragY - JunkBW,
|
moving_icon ? 0 : tmp_win->title_height);
|
||||||
DragWidth + 2 * JunkBW, DragHeight + 2 * JunkBW,
|
/*
|
||||||
tmp_win->frame_bw,
|
* This next line causes HandleReleaseNotify to call
|
||||||
moving_icon ? 0 : tmp_win->title_height);
|
* XRaiseWindow(). This is solely to preserve the
|
||||||
/*
|
* previous behaviour that raises a window being moved
|
||||||
* This next line causes HandleReleaseNotify to call
|
* on button release even if you never actually moved
|
||||||
* XRaiseWindow(). This is solely to preserve the
|
* any distance (unless you move less than MoveDelta or
|
||||||
* previous behaviour that raises a window being moved
|
* NoRaiseMove is set).
|
||||||
* on button release even if you never actually moved
|
*/
|
||||||
* any distance (unless you move less than MoveDelta or
|
DragWindow = w;
|
||||||
* NoRaiseMove is set or OpaqueMove is set).
|
|
||||||
*/
|
|
||||||
DragWindow = w;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1609,10 +1604,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
/* test to see if we have a second button press to abort move */
|
/* test to see if we have a second button press to abort move */
|
||||||
if (!menuFromFrameOrWindowOrTitlebar && !MovedFromKeyPress) {
|
if (!menuFromFrameOrWindowOrTitlebar && !MovedFromKeyPress) {
|
||||||
if (Event.type == ButtonPress && DragWindow != None) {
|
if (Event.type == ButtonPress && DragWindow != None) {
|
||||||
if (Scr->OpaqueMove)
|
MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
|
||||||
XMoveWindow (dpy, DragWindow, origDragX, origDragY);
|
|
||||||
else
|
|
||||||
MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
|
|
||||||
DragWindow = None;
|
DragWindow = None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1631,9 +1623,8 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
if (Cancel)
|
if (Cancel)
|
||||||
{
|
{
|
||||||
WindowMoved = FALSE;
|
WindowMoved = FALSE;
|
||||||
if (!Scr->OpaqueMove)
|
UninstallRootColormap();
|
||||||
UninstallRootColormap();
|
return TRUE; /* XXX should this be FALSE? */
|
||||||
return TRUE; /* XXX should this be FALSE? */
|
|
||||||
}
|
}
|
||||||
if (Event.type == releaseEvent)
|
if (Event.type == releaseEvent)
|
||||||
{
|
{
|
||||||
@ -1642,7 +1633,7 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
((CurrentDragX != origDragX ||
|
((CurrentDragX != origDragX ||
|
||||||
CurrentDragY != origDragY)))
|
CurrentDragY != origDragY)))
|
||||||
tmp_win->icon_moved = TRUE;
|
tmp_win->icon_moved = TRUE;
|
||||||
if (!Scr->OpaqueMove && menuFromFrameOrWindowOrTitlebar)
|
if (menuFromFrameOrWindowOrTitlebar)
|
||||||
XMoveWindow(dpy, DragWindow,
|
XMoveWindow(dpy, DragWindow,
|
||||||
Event.xbutton.x_root - DragWidth / 2,
|
Event.xbutton.x_root - DragWidth / 2,
|
||||||
Event.xbutton.y_root - DragHeight / 2);
|
Event.xbutton.y_root - DragHeight / 2);
|
||||||
@ -1665,9 +1656,6 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
WindowMoved = TRUE;
|
WindowMoved = TRUE;
|
||||||
DragWindow = w;
|
DragWindow = w;
|
||||||
|
|
||||||
if (!Scr->NoRaiseMove && Scr->OpaqueMove) /* can't restore... */
|
|
||||||
XRaiseWindow(dpy, DragWindow);
|
|
||||||
|
|
||||||
if (ConstMove)
|
if (ConstMove)
|
||||||
{
|
{
|
||||||
switch (ConstMoveDir)
|
switch (ConstMoveDir)
|
||||||
@ -1720,12 +1708,9 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
}
|
}
|
||||||
CurrentDragX = xl;
|
CurrentDragX = xl;
|
||||||
CurrentDragY = yt;
|
CurrentDragY = yt;
|
||||||
if (Scr->OpaqueMove)
|
MoveOutline(eventp->xmotion.root, xl, yt, w, h,
|
||||||
XMoveWindow(dpy, DragWindow, xl, yt);
|
tmp_win->frame_bw,
|
||||||
else
|
moving_icon ? 0 : tmp_win->title_height);
|
||||||
MoveOutline(eventp->xmotion.root, xl, yt, w, h,
|
|
||||||
tmp_win->frame_bw,
|
|
||||||
moving_icon ? 0 : tmp_win->title_height);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (DragWindow != None)
|
else if (DragWindow != None)
|
||||||
@ -1760,19 +1745,16 @@ ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
|
|||||||
|
|
||||||
CurrentDragX = xl;
|
CurrentDragX = xl;
|
||||||
CurrentDragY = yt;
|
CurrentDragY = yt;
|
||||||
if (Scr->OpaqueMove)
|
MoveOutline(eventp->xmotion.root, xl, yt, w, h,
|
||||||
XMoveWindow(dpy, DragWindow, xl, yt);
|
tmp_win->frame_bw,
|
||||||
else
|
moving_icon ? 0 : tmp_win->title_height);
|
||||||
MoveOutline(eventp->xmotion.root, xl, yt, w, h,
|
|
||||||
tmp_win->frame_bw,
|
|
||||||
moving_icon ? 0 : tmp_win->title_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
MovedFromKeyPress = False;
|
MovedFromKeyPress = False;
|
||||||
|
|
||||||
|
|
||||||
if (!Scr->OpaqueMove && DragWindow == None)
|
if (DragWindow == None)
|
||||||
UninstallRootColormap();
|
UninstallRootColormap();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -312,7 +312,6 @@ typedef struct _TwmKeyword {
|
|||||||
#define kw0_NoDefaults 1
|
#define kw0_NoDefaults 1
|
||||||
#define kw0_AutoRelativeResize 2
|
#define kw0_AutoRelativeResize 2
|
||||||
#define kw0_ForceIcons 3
|
#define kw0_ForceIcons 3
|
||||||
#define kw0_OpaqueMove 5
|
|
||||||
#define kw0_InterpolateMenuColors 6
|
#define kw0_InterpolateMenuColors 6
|
||||||
#define kw0_NoVersion 7
|
#define kw0_NoVersion 7
|
||||||
#define kw0_NoGrabServer 9
|
#define kw0_NoGrabServer 9
|
||||||
@ -509,7 +508,6 @@ static TwmKeyword keytable[] = {
|
|||||||
{ "notitle", NO_TITLE, 0 },
|
{ "notitle", NO_TITLE, 0 },
|
||||||
{ "notitlefocus", KEYWORD, kw0_NoTitleFocus },
|
{ "notitlefocus", KEYWORD, kw0_NoTitleFocus },
|
||||||
{ "noversion", KEYWORD, kw0_NoVersion },
|
{ "noversion", KEYWORD, kw0_NoVersion },
|
||||||
{ "opaquemove", KEYWORD, kw0_OpaqueMove },
|
|
||||||
{ "pointerbackground", CKEYWORD, kwc_PointerBackground },
|
{ "pointerbackground", CKEYWORD, kwc_PointerBackground },
|
||||||
{ "pointerforeground", CKEYWORD, kwc_PointerForeground },
|
{ "pointerforeground", CKEYWORD, kwc_PointerForeground },
|
||||||
{ "priority", NKEYWORD, kwn_Priority },
|
{ "priority", NKEYWORD, kwn_Priority },
|
||||||
@ -593,10 +591,6 @@ int do_single_keyword (int keyword)
|
|||||||
if (Scr->FirstTime) Scr->ForceIcon = TRUE;
|
if (Scr->FirstTime) Scr->ForceIcon = TRUE;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case kw0_OpaqueMove:
|
|
||||||
Scr->OpaqueMove = TRUE;
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
case kw0_InterpolateMenuColors:
|
case kw0_InterpolateMenuColors:
|
||||||
if (Scr->FirstTime) Scr->InterpolateMenuColors = TRUE;
|
if (Scr->FirstTime) Scr->InterpolateMenuColors = TRUE;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -211,7 +211,6 @@ typedef struct ScreenInfo
|
|||||||
short BackingStore; /* use backing store for menus */
|
short BackingStore; /* use backing store for menus */
|
||||||
short SaveUnder; /* use save under's for menus */
|
short SaveUnder; /* use save under's for menus */
|
||||||
short RandomPlacement; /* randomly place windows that no give hints */
|
short RandomPlacement; /* randomly place windows that no give hints */
|
||||||
short OpaqueMove; /* move the window rather than outline */
|
|
||||||
short StackMode; /* should we honor stack mode requests */
|
short StackMode; /* should we honor stack mode requests */
|
||||||
short MoveDelta; /* number of pixels before f.move starts */
|
short MoveDelta; /* number of pixels before f.move starts */
|
||||||
short ZoomCount; /* zoom outline count */
|
short ZoomCount; /* zoom outline count */
|
||||||
|
@ -721,7 +721,6 @@ InitVariables(void)
|
|||||||
Scr->BackingStore = TRUE;
|
Scr->BackingStore = TRUE;
|
||||||
Scr->SaveUnder = TRUE;
|
Scr->SaveUnder = TRUE;
|
||||||
Scr->RandomPlacement = FALSE;
|
Scr->RandomPlacement = FALSE;
|
||||||
Scr->OpaqueMove = FALSE;
|
|
||||||
Scr->StackMode = TRUE;
|
Scr->StackMode = TRUE;
|
||||||
Scr->MoveDelta = 1; /* so that f.deltastop will work */
|
Scr->MoveDelta = 1; /* so that f.deltastop will work */
|
||||||
Scr->ZoomCount = 8;
|
Scr->ZoomCount = 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user