Closed delphius closed 11 months ago
Yes, that's happen in some specific scenarios/OS. We can fix this by using OS APIs to get the window ID and bring it to the front, but this is low priority for now.
Please keep this open until gets implemented.
It would be useful if there was function to return actual OS window handle, then it would be possible to set the focus to this window, and also do more useful things. For example show & hide window if tray icon clicked.
Unfortunately, we can't control the behavior of the web browser. I added two new APIs to get the process ID, but for now, those APIs are "useless" because the web browser create many child process for the window and dispatch the main parent process ID.
I will close this as a won't fix
.
printf("Child process: %lld\n", webui_get_child_process_id(my_window));
printf("Parent process: %lld\n", webui_get_parent_process_id(my_window));
If anyone have a solution/suggestion we will re-open this issue.
New update https://github.com/webui-dev/webui/commit/a616991ca679f0646bf35d580443e101369273ce.
Now webui_get_child_process_id()
will return the correct web browser's last child process ID.
It's not the first time I've encountered it, when you run a program from a folder, the program window (browser) itself opens BEHIND this folder, and not in front of it, as it would be logical.
Is it the same for everyone and what is the reason?