mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve window sdl focus
This commit is contained in:
parent
48dab8a03d
commit
6ce3bd1e30
@ -2,6 +2,7 @@
|
||||
|
||||
2023/04/18
|
||||
* 修改离线画布用户自定义函数的宏名字(感谢智明提供补丁)
|
||||
* 支持SDL点击窗口后自动聚焦(感谢智明提供补丁)
|
||||
|
||||
2023/04/15
|
||||
* 增加cmd_args用于解析命令行参数。
|
||||
|
@ -658,6 +658,7 @@ ret_t native_window_sdl_init(bool_t shared, uint32_t w, uint32_t h) {
|
||||
const char* title = system_info()->app_name;
|
||||
|
||||
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_AUDIO) != 0) {
|
||||
log_debug("Failed to initialize SDL: %s", SDL_GetError());
|
||||
exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user