Make "only primary mouse button raises" option take effect immediately
This commit is contained in:
parent
0a6b8e177c
commit
e6b62914b4
|
@ -87,6 +87,7 @@ struct _ewin {
|
|||
char visibility;
|
||||
char shaped;
|
||||
char shaded;
|
||||
unsigned char click_grab_button;
|
||||
|
||||
unsigned snapstarted:1; /* Started from snap cmd */
|
||||
unsigned identified:1;
|
||||
|
|
10
src/focus.c
10
src/focus.c
|
@ -236,6 +236,13 @@ ClickGrabsSet(EWin * ewin)
|
|||
|
||||
if (set)
|
||||
{
|
||||
if (ewin->state.click_grab_isset &&
|
||||
ewin->state.click_grab_button != raise_button)
|
||||
{
|
||||
GrabButtonRelease(ewin->state.click_grab_button, AnyModifier,
|
||||
EwinGetClientConWin(ewin));
|
||||
ewin->state.click_grab_isset = 0;
|
||||
}
|
||||
if (!ewin->state.click_grab_isset)
|
||||
{
|
||||
GrabButtonSet(raise_button, AnyModifier, EwinGetClientConWin(ewin),
|
||||
|
@ -244,13 +251,14 @@ ClickGrabsSet(EWin * ewin)
|
|||
Eprintf("%s: %#x set %s\n", __func__,
|
||||
EwinGetClientXwin(ewin), EwinGetTitle(ewin));
|
||||
ewin->state.click_grab_isset = 1;
|
||||
ewin->state.click_grab_button = raise_button;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ewin->state.click_grab_isset)
|
||||
{
|
||||
GrabButtonRelease(raise_button, AnyModifier,
|
||||
GrabButtonRelease(ewin->state.click_grab_button, AnyModifier,
|
||||
EwinGetClientConWin(ewin));
|
||||
if (EDebug(EDBUG_TYPE_GRABS))
|
||||
Eprintf("%s: %#x unset %s\n", __func__,
|
||||
|
|
Loading…
Reference in New Issue