Client/Event: Fix raise with max flag and use flag IgnoreNextExose instead XQueryPointer for raise in client_focus
This commit is contained in:
parent
13ac8cfa82
commit
2a30083520
16
src/client.c
16
src/client.c
@ -247,8 +247,6 @@ void
|
||||
client_focus(Client *c)
|
||||
{
|
||||
Client *cc;
|
||||
Window w;
|
||||
int d;
|
||||
|
||||
if(sel && sel != c)
|
||||
{
|
||||
@ -279,14 +277,10 @@ client_focus(Client *c)
|
||||
frame_update(c);
|
||||
mouse_grabbuttons(c, True);
|
||||
|
||||
if(conf.raisefocus)
|
||||
if(conf.raisefocus || c->flags & MaxFlag)
|
||||
{
|
||||
XQueryPointer(dpy, ROOT, &w, &w, &d, &d, &d, &d, (uint *)&d);
|
||||
|
||||
if(c == client_gb_win(w)
|
||||
|| c == client_gb_frame(w)
|
||||
|| c == client_gb_titlebar(w))
|
||||
client_raise(c);
|
||||
client_raise(c);
|
||||
tags[c->screen][c->tag].flags |= IgnoreNextExpose;
|
||||
}
|
||||
|
||||
if((tags[sel->screen][sel->tag].flags & AboveFCFlag)
|
||||
@ -1094,8 +1088,8 @@ client_update_attributes(Client *c)
|
||||
void
|
||||
client_raise(Client *c)
|
||||
{
|
||||
if((!c || ((c->flags & TileFlag) && !(c->flags & AboveFlag)))
|
||||
&& !conf.client_tile_raise)
|
||||
if((!c || ((c->flags & TileFlag) && !(c->flags & (AboveFlag | MaxFlag))))
|
||||
&& !conf.client_tile_raise)
|
||||
return;
|
||||
|
||||
XRaiseWindow(dpy, c->frame);
|
||||
|
||||
11
src/event.c
11
src/event.c
@ -368,11 +368,16 @@ enternotify(XEvent *e)
|
||||
Client *c;
|
||||
int n;
|
||||
|
||||
if((ev->mode != NotifyNormal
|
||||
|| ev->detail == NotifyInferior)
|
||||
&& ev->window != ROOT)
|
||||
if((ev->mode != NotifyNormal || ev->detail == NotifyInferior)
|
||||
&& ev->window != ROOT)
|
||||
return;
|
||||
|
||||
if(tags[selscreen][seltag[selscreen]].flags & IgnoreNextExpose)
|
||||
{
|
||||
tags[selscreen][seltag[selscreen]].flags &= ~IgnoreNextExpose;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Don't handle EnterNotify event if it's about systray */
|
||||
if(systray_find(ev->window) || ev->window == traywin)
|
||||
return;
|
||||
|
||||
@ -89,8 +89,8 @@ freelayout(int screen)
|
||||
|
||||
for(c = clients; c; c = c->next)
|
||||
if(!ishide(c, selscreen)
|
||||
&& c->screen == screen_get_sel()
|
||||
&& !(c->flags & MaxFlag))
|
||||
&& c->screen == screen
|
||||
&& !(c->flags & MaxFlag))
|
||||
{
|
||||
client_moveresize(c, c->free_geo, True);
|
||||
c->flags &= ~(TileFlag | LMaxFlag);
|
||||
|
||||
@ -67,6 +67,7 @@
|
||||
#define StayLastFlag (1 << 6)
|
||||
#define SplitFlag (1 << 7)
|
||||
#define FirstArrangeFlag (1 << 8)
|
||||
#define IgnoreNextExpose (1 << 9)
|
||||
|
||||
#define TagFlag(t) (1 << (t))
|
||||
|
||||
@ -529,27 +530,27 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint x, y, w, h;
|
||||
int x, y, w, h;
|
||||
uint color;
|
||||
} StatusRec;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint x, y, w, h;
|
||||
int x, y, w, h;
|
||||
uint color;
|
||||
char data[512];
|
||||
} StatusGraph;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint x, y;
|
||||
int x, y;
|
||||
char color[8];
|
||||
char text[512];
|
||||
} StatusText;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint x, y, w, h;
|
||||
int x, y, w, h;
|
||||
char name[512];
|
||||
} ImageAttr;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user