- else {
- assert(first != second);
- assert(first->parent == second->parent);
- resize_graphical_handler(first, second, orientation, event);
- }
+
+ assert(first != second);
+ assert(first->parent == second->parent);
+
+ /* We modify the X/Y position in the event so that the divider line is at
+ * the actual position of the border, not at the position of the click. */
+ if (orientation == HORIZ)
+ event->root_x = second->rect.x;
+ else event->root_y = second->rect.y;
+
+ resize_graphical_handler(first, second, orientation, event);