{
XEvent ev;
Time time = 0;
- struct swm_region *r = win->ws->r;
+ struct swm_region *r = NULL;
int relx, rely;
int resize_step = 0;
+ if (win == NULL)
+ return;
+ r = win->ws->r;
DNPRINTF(SWM_D_MOUSE, "resize: win %lu floating %d trans %lu\n",
win->id, win->floating, win->transient);
{
struct ws_win *win = NULL;
- if (r && r->ws)
+ if (r && r->ws && r->ws->focus)
win = r->ws->focus;
else
return;
XEvent ev;
Time time = 0;
int move_step = 0;
- struct swm_region *r = win->ws->r;
+ struct swm_region *r = NULL;
+
+ if (win == NULL)
+ return;
+ r = win->ws->r;
DNPRINTF(SWM_D_MOUSE, "move: win %lu floating %d trans %lu\n",
win->id, win->floating, win->transient);
{
struct ws_win *win = NULL;
- if (r && r->ws)
+ if (r && r->ws && r->ws->focus)
win = r->ws->focus;
else
return;