don't set the global moving state unless the move/resize is accepted

This commit is contained in:
Dana Jansens 2007-05-27 04:16:14 +00:00
parent 47986dcd9c
commit fe99440c16

View file

@ -152,12 +152,11 @@ static void popup_coords(ObClient *c, const gchar *format, gint a, gint b)
void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr) void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
{ {
ObCursor cur; ObCursor cur;
gboolean mv = (cnr == prop_atoms.net_wm_moveresize_move ||
moving = (cnr == prop_atoms.net_wm_moveresize_move || cnr == prop_atoms.net_wm_moveresize_move_keyboard);
cnr == prop_atoms.net_wm_moveresize_move_keyboard);
if (moveresize_in_progress || !c->frame->visible || if (moveresize_in_progress || !c->frame->visible ||
!(moving ? !(mv ?
(c->functions & OB_CLIENT_FUNC_MOVE) : (c->functions & OB_CLIENT_FUNC_MOVE) :
(c->functions & OB_CLIENT_FUNC_RESIZE))) (c->functions & OB_CLIENT_FUNC_RESIZE)))
return; return;
@ -197,6 +196,7 @@ void moveresize_start(ObClient *c, gint x, gint y, guint b, guint32 cnr)
frame_end_iconify_animation(c->frame); frame_end_iconify_animation(c->frame);
moving = mv;
moveresize_client = c; moveresize_client = c;
start_cx = c->area.x; start_cx = c->area.x;
start_cy = c->area.y; start_cy = c->area.y;