Skip to content

Commit

Permalink
resolve the compiling error: ‘SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOS…
Browse files Browse the repository at this point in the history
…ITOR’ undeclared (first use in this function)

Signed-off-by: david.cheng <[email protected]>
  • Loading branch information
DavidChan0519 committed Feb 13, 2023
1 parent 7c0e8fc commit 3af039f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/mnist/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,8 +2238,13 @@ static struct window_context_t * window_context_alloc(void)
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);
SDL_EnableScreenSaver();
SDL_EventState(SDL_DROPFILE, SDL_ENABLE);
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
#endif

#ifdef SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
#endif

wctx->window = SDL_CreateWindow("The mnist handwritten digit prediction (https://github.com/xboot/libonnx)", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS);
wctx->screen = SDL_GetWindowSurface(wctx->window);
Expand Down

0 comments on commit 3af039f

Please sign in to comment.