mirror of
https://github.com/dylanaraps/sowm.git
synced 2026-11-28 21:08:41 +00:00
sowm: fix focus bug
This commit is contained in:
1 parent
6167924df2
commit
6a560c413a
1 file changed
+7
-6
@@ -80,10 +80,16 @@ static void (*events[LASTEvent])(XEvent *e) = {
|
|||||||
[MotionNotify] = notify_motion
|
[MotionNotify] = notify_motion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Window win_current() {
|
||||||
|
XGetInputFocus(d, &cur, &j);
|
||||||
|
return cur;
|
||||||
|
}
|
||||||
|
|
||||||
void notify_destroy(XEvent *e) {
|
void notify_destroy(XEvent *e) {
|
||||||
win_del(e->xdestroywindow.window);
|
win_del(e->xdestroywindow.window);
|
||||||
|
win_current();
|
||||||
|
|
||||||
if (list) FOC(list->w);
|
if (list) FOC(cur == root ? list->w : cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify_enter(XEvent *e) {
|
void notify_enter(XEvent *e) {
|
||||||
@@ -138,11 +144,6 @@ void button_release() {
|
|||||||
mouse.subwindow = None;
|
mouse.subwindow = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window win_current() {
|
|
||||||
XGetInputFocus(d, &cur, &j);
|
|
||||||
return cur;
|
|
||||||
}
|
|
||||||
|
|
||||||
void win_add(Window w) {
|
void win_add(Window w) {
|
||||||
client *c, *t;
|
client *c, *t;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user