render_con(con, false);
if (set_focus)
- con_focus(con);
+ con_activate(con);
/* Check if we need to re-assign it to a different workspace because of its
* coordinates and exit if that was done successfully. */
con_fix_percent(con->parent);
if (set_focus)
- con_focus(con);
+ con_activate(con);
floating_set_hint_atom(con, false);
ipc_send_window_event("floating", con);
DLOG("Moving con %p / %s to workspace %p / %s\n", con, con->name, ws, ws->name);
con_move_to_workspace(con, ws, false, true, false);
workspace_show(ws);
- con_focus(con_descend_focused(con));
+ con_activate(con_descend_focused(con));
return true;
}
if (last_motion_notify != (xcb_motion_notify_event_t *)event)
free(event);
- if (dragloop->result != DRAGGING)
+ if (dragloop->result != DRAGGING) {
+ free(last_motion_notify);
return;
+ }
}
if (last_motion_notify == NULL)
* outputs.
*
*/
-void floating_reposition(Con *con, Rect newrect) {
+bool floating_reposition(Con *con, Rect newrect) {
/* Sanity check: Are the new coordinates on any output? If not, we
* ignore that request. */
if (!contained_by_output(newrect)) {
ELOG("No output found at destination coordinates. Not repositioning.\n");
- return;
+ return false;
}
con->rect = newrect;
con->scratchpad_state = SCRATCHPAD_CHANGED;
tree_render();
+ return true;
}
/*