Linux: cleanup and remove input grab in button press
This commit is contained in:
parent
bb1d59fffe
commit
9cd4948517
|
@ -124,10 +124,11 @@ static bool blankCursor(void) {
|
|||
|
||||
static void updateCursor(void) {
|
||||
Cursor cursor;
|
||||
if (shouldGrab())
|
||||
if (shouldGrab()) {
|
||||
cursor = blank_cursor;
|
||||
else
|
||||
} else {
|
||||
cursor = current_cursor;
|
||||
}
|
||||
XDefineCursor(getDisplay(), getCurrentWindow(), cursor);
|
||||
}
|
||||
|
||||
|
@ -143,7 +144,6 @@ static void grabPointer(void) {
|
|||
if (isLegacyFullscreen()) {
|
||||
XWindowAttributes win_attribs;
|
||||
XGetWindowAttributes(getDisplay(), getCurrentWindow(), &win_attribs);
|
||||
// XF86VidModeSetViewPort(getDisplay(), getCurrentScreen(), 0, 0);
|
||||
XF86VidModeSetViewPort(getDisplay(), getCurrentScreen(), win_attribs.x, win_attribs.y);
|
||||
}
|
||||
XFlush(getDisplay());
|
||||
|
|
|
@ -218,11 +218,6 @@ void setGrab(bool new_grab) {
|
|||
if (new_grab != grab) {
|
||||
grab = new_grab;
|
||||
updateInputGrab();
|
||||
/* // Attempt to regain focus
|
||||
if (grab) {
|
||||
XMapRaised(getDisplay(), getCurrentWindow());
|
||||
waitMapped(getCurrentWindow());
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,7 +273,6 @@ static void handleMessages() {
|
|||
dirty = true;
|
||||
break;
|
||||
case ButtonPress:
|
||||
checkInput();
|
||||
handleButtonPress(&(event.xbutton));
|
||||
break;
|
||||
case ButtonRelease:
|
||||
|
|
Loading…
Reference in New Issue