+ SetForegroundWindow(win->sys->hwnd);
+ //HWND hwnd = win->sys->hwnd;
+ //HWND top = GetAncestor(hwnd,GA_ROOT);
+ //SetWindowPos(top, HWND_TOPMOST, 0, 0, 0, 0,
+ // SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+}
+
+void sys_focus(win_t *win)
+{
+ printf("sys_focus: %p\n", win);
+ //POINT wptr;
+ //GetCursorPos(&wptr);
+ //HWND old = GetForegroundWindow();
+ //HWND newc = WindowFromPoint(wptr);
+ //HWND new = GetAncestor(newc,GA_ROOT);
+ //SetWindowPos(new, HWND_NOTOPMOST, 0, 0, 0, 0,
+ // SWP_NOMOVE|SWP_NOSIZE);
+ //SetWindowPos(old, HWND_NOTOPMOST, 0, 0, 0, 0,
+ // SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+ //SetFocus(hwnd);
+ //SetActiveWindow(hwnd);
+
+ // Go to: HKEY_CURRENT_USER\Control Panel\Mouse
+ // Modify/Create DWORD Value of Data type REG_DWORD Named [ActiveWindowTracking] Setting for Value Data: [0 = ActiveWindowTracking Disabled / 1 = ActiveWindowTracking Enabled]
+
+ //LockSetForegroundWindow(LSFW_LOCK);
+ //SetForegroundWindow(win->sys->hwnd);
+ //LockSetForegroundWindow(LSFW_UNLOCK);
+ //SetFocus(win->sys->hwnd);
+ //SetActiveWindow(win->sys->hwnd);
+ //EnableWindow(win->sys->hwnd, TRUE);