Linux: cleanup and remove input grab in button press

This commit is contained in:
Elias Naur 2004-08-23 10:59:47 +00:00
parent bb1d59fffe
commit 9cd4948517
2 changed files with 3 additions and 9 deletions

View File

@ -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());

View File

@ -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: