mirror of
https://github.com/morgant/mlvwm.git
synced 2024-06-03 00:29:50 +00:00
Updated handle_button_press() to appropriately pass initial click in inactive windows, plus added 'SwallowFocusClick' config command to disable the functionality. Issue #24
This commit is contained in:
parent
f6b4a84199
commit
2d324d13cf
|
@ -431,6 +431,11 @@ void SetSloppyFocus( char *line, FILE *fp )
|
||||||
Scr.flags |= SLOPPYFOCUS;
|
Scr.flags |= SLOPPYFOCUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetSwallowFocusClick( char *line, FILE *fp )
|
||||||
|
{
|
||||||
|
Scr.flags |= SWALLOWFOCUSCLICK;
|
||||||
|
}
|
||||||
|
|
||||||
void SetStickyHide( char *line, FILE *fp )
|
void SetStickyHide( char *line, FILE *fp )
|
||||||
{
|
{
|
||||||
Scr.flags |= STICKHIDE;
|
Scr.flags |= STICKHIDE;
|
||||||
|
@ -748,6 +753,7 @@ config_func main_config[]={
|
||||||
{ "StickyHide", SetStickyHide },
|
{ "StickyHide", SetStickyHide },
|
||||||
{ "Style", SetStyles },
|
{ "Style", SetStyles },
|
||||||
{ "Swallow", SetSwallow },
|
{ "Swallow", SetSwallow },
|
||||||
|
{ "SwallowFocusClick", SetSwallowFocusClick },
|
||||||
{ "System8", SetSystem8 },
|
{ "System8", SetSystem8 },
|
||||||
{ "OpaqueMove", SetOpaqueMove },
|
{ "OpaqueMove", SetOpaqueMove },
|
||||||
{ "OpaqueResize", SetOpaqueResize },
|
{ "OpaqueResize", SetOpaqueResize },
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct configure
|
||||||
|
|
||||||
extern void SetDeskTopNum( char *, FILE * );
|
extern void SetDeskTopNum( char *, FILE * );
|
||||||
extern void SetFollowToMouse( char *, FILE * );
|
extern void SetFollowToMouse( char *, FILE * );
|
||||||
|
extern void SetSwallowFocusClick( char *, FILE * );
|
||||||
extern void ReadConfigFile( char * );
|
extern void ReadConfigFile( char * );
|
||||||
extern void FreeStyles( void );
|
extern void FreeStyles( void );
|
||||||
|
|
||||||
|
|
|
@ -1384,7 +1384,11 @@ void handle_button_press( XEvent *ev )
|
||||||
ev->xany.window = ev->xbutton.subwindow;
|
ev->xany.window = ev->xbutton.subwindow;
|
||||||
context = GetContext( Tmp_win, ev, &win );
|
context = GetContext( Tmp_win, ev, &win );
|
||||||
}
|
}
|
||||||
XAllowEvents(dpy, AsyncPointer, CurrentTime );
|
if ( context==C_TITLE || Scr.flags&SWALLOWFOCUSCLICK )
|
||||||
|
XAllowEvents(dpy, AsyncPointer, CurrentTime );
|
||||||
|
else {
|
||||||
|
XAllowEvents(dpy, ReplayPointer, CurrentTime );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
XAllowEvents(dpy, ReplayPointer, CurrentTime );
|
XAllowEvents(dpy, ReplayPointer, CurrentTime );
|
||||||
|
|
|
@ -142,6 +142,7 @@ typedef struct ScreenInfo
|
||||||
#define ONECLICKMENU 0x00010000
|
#define ONECLICKMENU 0x00010000
|
||||||
#define DEBUGOUT 0x00020000
|
#define DEBUGOUT 0x00020000
|
||||||
#define ROUNDEDCORNERS 0x00040000
|
#define ROUNDEDCORNERS 0x00040000
|
||||||
|
#define SWALLOWFOCUSCLICK 0x00080000
|
||||||
|
|
||||||
#ifdef USE_LOCALE
|
#ifdef USE_LOCALE
|
||||||
#define MENUBARFONT Scr.MenuBarFs
|
#define MENUBARFONT Scr.MenuBarFs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user