summaryrefslogtreecommitdiff
path: root/libwnck
diff options
context:
space:
mode:
authorBenjamin Otte <otte@src.gnome.org>2006-05-17 12:55:10 +0000
committerBenjamin Otte <otte@src.gnome.org>2006-05-17 12:55:10 +0000
commit30b0a29b8fc502ab94a238f21e644f01fee4f392 (patch)
tree7b584523c4f192d7834cfda844ed30ec1bb31bfb /libwnck
parentc4ed38ba908ae424822edfccbd88b30457c4a8b7 (diff)
downloadlibwnck-30b0a29b8fc502ab94a238f21e644f01fee4f392.tar.gz
Restart the activation timeout when the mouse moves to a different
* libwnck/pager.c: (wnck_pager_drag_motion): Restart the activation timeout when the mouse moves to a different workspace * libwnck/window.c: document wnck_window_is_skip_tasklist()
Diffstat (limited to 'libwnck')
-rw-r--r--libwnck/pager.c28
-rw-r--r--libwnck/window.c8
2 files changed, 29 insertions, 7 deletions
diff --git a/libwnck/pager.c b/libwnck/pager.c
index 9ef7c05..ba34bfd 100644
--- a/libwnck/pager.c
+++ b/libwnck/pager.c
@@ -1247,24 +1247,38 @@ wnck_pager_drag_motion (GtkWidget *widget,
guint time)
{
WnckPager *pager;
+ gint previous_workspace;
pager = WNCK_PAGER (widget);
+ previous_workspace = pager->priv->prelight;
+ wnck_pager_check_prelight (pager, x, y, TRUE);
+
if (gtk_drag_dest_find_target (widget, context, NULL))
{
gdk_drag_status (context, context->suggested_action, time);
}
else
{
- if (pager->priv->dnd_activate == 0)
- pager->priv->dnd_activate = g_timeout_add (WNCK_ACTIVATE_TIMEOUT,
- wnck_pager_drag_motion_timeout,
- pager);
-
- pager->priv->dnd_time = time;
gdk_drag_status (context, 0, time);
+
+ if (pager->priv->prelight != previous_workspace &&
+ pager->priv->dnd_activate != 0)
+ {
+ /* remove timeout, the window we hover over changed */
+ g_source_remove (pager->priv->dnd_activate);
+ pager->priv->dnd_activate = 0;
+ pager->priv->dnd_time = 0;
+ }
+
+ if (pager->priv->dnd_activate == 0 && pager->priv->prelight > -1)
+ {
+ pager->priv->dnd_activate = g_timeout_add (WNCK_ACTIVATE_TIMEOUT,
+ wnck_pager_drag_motion_timeout,
+ pager);
+ pager->priv->dnd_time = time;
+ }
}
- wnck_pager_check_prelight (pager, x, y, TRUE);
return (pager->priv->prelight != -1);
}
diff --git a/libwnck/window.c b/libwnck/window.c
index 83e9ea1..e26bf73 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -828,6 +828,14 @@ wnck_window_is_shaded (WnckWindow *window)
return window->priv->is_shaded;
}
+/**
+ * wnck_window_is_skip_tasklist:
+ * @window: a #WnckWindow
+ *
+ *
+ *
+ * Returns: TRUE if the window should be skipped in tasklists.
+ **/
gboolean
wnck_window_is_above (WnckWindow *window)
{