- Support HOMEPATH for config file for win32
- Fix sys_exit on win32 (remove running flag and use WM_QUIT)
- Don't auto-focus windows that are shaded
{
conf_argc = argc;
conf_argv = argv;
{
conf_argc = argc;
conf_argv = argv;
- snprintf(conf_path, sizeof(conf_path),
- "%s/%s", getenv("HOME"), ".wmpus");
+ snprintf(conf_path, sizeof(conf_path), "%s/%s",
+ getenv("HOME") ?: getenv("HOMEPATH") ?: ".",
+ ".wmpus");
} keymap_t;
/* Global data */
} keymap_t;
/* Global data */
static int shellhookid;
static void *cache;
static win_t *root;
static int shellhookid;
static void *cache;
static win_t *root;
void sys_run(win_t *root)
{
void sys_run(win_t *root)
{
if (!NO_CAPTURE)
EnumWindows(LoopProc, 0);
if (!NO_CAPTURE)
EnumWindows(LoopProc, 0);
-
- running = 1;
- while (running && GetMessage(&msg, NULL, 0, 0) > 0) {
+ while (GetMessage(&msg, NULL, 0, 0) > 0 &&
+ msg.message != WM_QUIT) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
void sys_free(win_t *root)
}
void sys_free(win_t *root)
if (move_mode != none && mod.up)
return set_move(win,ptr,none), 1;
if (key == key_mouse1 && !mod.up && win->h == STACK)
if (move_mode != none && mod.up)
return set_move(win,ptr,none), 1;
if (key == key_mouse1 && !mod.up && win->h == STACK)
+ return set_focus(win), wm_update(), 0;
+ if (key == key_enter && win->h != STACK)
return set_focus(win), 1;
if (key_mouse0 <= key && key <= key_mouse7)
return set_focus(win), 1;
if (key_mouse0 <= key && key <= key_mouse7)