mirror of
https://github.com/morgant/mlvwm.git
synced 2025-02-07 00:30:31 +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;
|
||||
}
|
||||
|
||||
void SetSwallowFocusClick( char *line, FILE *fp )
|
||||
{
|
||||
Scr.flags |= SWALLOWFOCUSCLICK;
|
||||
}
|
||||
|
||||
void SetStickyHide( char *line, FILE *fp )
|
||||
{
|
||||
Scr.flags |= STICKHIDE;
|
||||
@ -748,6 +753,7 @@ config_func main_config[]={
|
||||
{ "StickyHide", SetStickyHide },
|
||||
{ "Style", SetStyles },
|
||||
{ "Swallow", SetSwallow },
|
||||
{ "SwallowFocusClick", SetSwallowFocusClick },
|
||||
{ "System8", SetSystem8 },
|
||||
{ "OpaqueMove", SetOpaqueMove },
|
||||
{ "OpaqueResize", SetOpaqueResize },
|
||||
|
@ -44,6 +44,7 @@ struct configure
|
||||
|
||||
extern void SetDeskTopNum( char *, FILE * );
|
||||
extern void SetFollowToMouse( char *, FILE * );
|
||||
extern void SetSwallowFocusClick( char *, FILE * );
|
||||
extern void ReadConfigFile( char * );
|
||||
extern void FreeStyles( void );
|
||||
|
||||
|
@ -1384,7 +1384,11 @@ void handle_button_press( XEvent *ev )
|
||||
ev->xany.window = ev->xbutton.subwindow;
|
||||
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
|
||||
XAllowEvents(dpy, ReplayPointer, CurrentTime );
|
||||
|
@ -142,6 +142,7 @@ typedef struct ScreenInfo
|
||||
#define ONECLICKMENU 0x00010000
|
||||
#define DEBUGOUT 0x00020000
|
||||
#define ROUNDEDCORNERS 0x00040000
|
||||
#define SWALLOWFOCUSCLICK 0x00080000
|
||||
|
||||
#ifdef USE_LOCALE
|
||||
#define MENUBARFONT Scr.MenuBarFs
|
||||
|
Loading…
x
Reference in New Issue
Block a user