x11 override redirect + mouseclick test
This commit is contained in:
parent
f6a75ff1af
commit
37ecf11926
1 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,13 @@ SDL_AppResult
|
|||
SDL_AppEvent(void *as, SDL_Event *ev)
|
||||
{
|
||||
switch (ev->type) {
|
||||
case SDL_EVENT_MOUSE_BUTTON_DOWN:
|
||||
babble("mouse button down event");
|
||||
if (ev->button.button == SDL_BUTTON_RIGHT) {
|
||||
babble("right-click quit requested");
|
||||
return SDL_APP_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case SDL_EVENT_QUIT:
|
||||
babble("quit requested");
|
||||
return SDL_APP_SUCCESS;
|
||||
|
@ -80,6 +87,8 @@ SDL_AppInit(void **as, int argc, char **argv)
|
|||
}
|
||||
*as = st;
|
||||
|
||||
SDL_SetHint(SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT, "1");
|
||||
|
||||
babble("create win+render...");
|
||||
if (!SDL_CreateWindowAndRenderer("slutpet", 320, 240,
|
||||
SDL_WINDOW_TRANSPARENT | SDL_WINDOW_BORDERLESS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue