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;
+ /* We ignored the release event so make sure we don't think
+ the button is still pressed */
+ else if (e->type == ButtonRelease)
+ button = 0;
}
}
else if (e->type == KeyPress || e->type == KeyRelease ||
to send it to other applications */
static gboolean replay_pointer_needed;
+/* this is the static button from mouse_event, moved here so that event.c can clear it */
+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;