DirectFB: Split input grab handling into keyboard and mouse parts

The grabbed_window field is superfluous now since SDL added the
SDL_GetGrabbedWindow() function, so it can be removed.

DirectFB_SetWindowMouseGrab() is also simplified because SDL handles ungrabbing
any previously grabbed window prior to calling SetWindowMouseGrab() now.

Compile-tested only.
This commit is contained in:
Cameron Gutman
2021-01-26 00:05:01 -06:00
parent de85d61256
commit a1d288bea1
6 changed files with 34 additions and 36 deletions

View File

@@ -114,6 +114,7 @@ DirectFB_CreateDevice(int devindex)
device->MinimizeWindow = DirectFB_MinimizeWindow;
device->RestoreWindow = DirectFB_RestoreWindow;
device->SetWindowMouseGrab = DirectFB_SetWindowMouseGrab;
device->SetWindowKeyboardGrab = DirectFB_SetWindowKeyboardGrab;
device->DestroyWindow = DirectFB_DestroyWindow;
device->GetWindowWMInfo = DirectFB_GetWindowWMInfo;
@@ -260,7 +261,6 @@ DirectFB_VideoInit(_THIS)
devdata->dfb = dfb;
devdata->firstwin = NULL;
devdata->grabbed_window = NULL;
_this->driverdata = devdata;