mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-02 05:06:45 +09:00
Check event window
This commit is contained in:
@@ -321,7 +321,7 @@ namespace gsr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
XNextEvent(display, &xev);
|
XNextEvent(display, &xev);
|
||||||
if(xev.type == ConfigureNotify) {
|
if(xev.type == ConfigureNotify && xev.xconfigure.window == window) {
|
||||||
got_data = xev.xconfigure.x > 0 && xev.xconfigure.y > 0;
|
got_data = xev.xconfigure.x > 0 && xev.xconfigure.y > 0;
|
||||||
position.x = xev.xconfigure.x + xev.xconfigure.width / 2;
|
position.x = xev.xconfigure.x + xev.xconfigure.width / 2;
|
||||||
position.y = xev.xconfigure.y + xev.xconfigure.height / 2;
|
position.y = xev.xconfigure.y + xev.xconfigure.height / 2;
|
||||||
@@ -382,7 +382,7 @@ namespace gsr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
XNextEvent(display, &xev);
|
XNextEvent(display, &xev);
|
||||||
if(xev.type == MapNotify) {
|
if(xev.type == MapNotify && xev.xmap.window == window) {
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
Window w = None;
|
Window w = None;
|
||||||
@@ -393,7 +393,7 @@ namespace gsr {
|
|||||||
position.y = y + size / 2;
|
position.y = y + size / 2;
|
||||||
if(got_data)
|
if(got_data)
|
||||||
break;
|
break;
|
||||||
} else if(xev.type == ConfigureNotify) {
|
} else if(xev.type == ConfigureNotify && xev.xconfigure.window == window) {
|
||||||
got_data = xev.xconfigure.x > 0 && xev.xconfigure.y > 0;
|
got_data = xev.xconfigure.x > 0 && xev.xconfigure.y > 0;
|
||||||
position.x = xev.xconfigure.x + xev.xconfigure.width / 2;
|
position.x = xev.xconfigure.x + xev.xconfigure.width / 2;
|
||||||
position.y = xev.xconfigure.y + xev.xconfigure.height / 2;
|
position.y = xev.xconfigure.y + xev.xconfigure.height / 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user