Previously if you click-drag-released the left button on the root window to a client window,
Openbox would ignore the release because we don't own the client window. Now check if we
are in a button press or not before ignoring it. The bug was we would initiate a move when
the cursor was moved over a titlebar even when the button was unpressed because the variable
didn't get cleared properly.
This fix is very ugly.
static guint unfocus_delay_timeout_id = 0;
static ObClient *unfocus_delay_timeout_client = NULL;
+extern guint button;
+
#ifdef USE_SM
static gboolean ice_handler(GIOChannel *source, GIOCondition cond,
gpointer conn)
if (e->type == ButtonPress)
pressed = e->xbutton.button;
+ /* If we have grabbed the mouse actively, I think this is how
+ to check it? */
+ else if (button)
+ event_handle_user_input(NULL, e);
}
}
else if (e->type == KeyPress || e->type == KeyRelease ||
to send it to other applications */
static gboolean replay_pointer_needed;
+guint button;
+
ObFrameContext mouse_button_frame_context(ObFrameContext context,
guint button,
guint state)
gboolean mouse_event(ObClient *client, XEvent *e)
{
static Time ltime;
- static guint button = 0, state = 0, lbutton = 0;
+ static guint state = 0, lbutton = 0;
static Window lwindow = None;
static gint px, py, pwx = -1, pwy = -1, lx = -10, ly = -10;
gboolean used = FALSE;