summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-window-picker-applet/task-title.c10
-rw-r--r--mate-window-picker-applet/task-title.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 8a8660e..6170c4c 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -74,7 +74,12 @@ on_close_clicked (GtkButton *button,
{
if (priv->window == window)
disconnect_window (title);
- wnck_window_close (window, event->time);
+ // event->time is buggy, thus we have to workaroud this
+ GdkScreen *gdkscreen;
+ GdkDisplay *display;
+ gdkscreen = gtk_widget_get_screen (GTK_WIDGET (title));
+ display = gdk_screen_get_display (gdkscreen);
+ wnck_window_close (window, gdk_x11_display_get_user_time (display));
}
gtk_widget_queue_draw (GTK_WIDGET (title));
@@ -342,8 +347,7 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
if (wnck_window_get_window_type (window) != WNCK_WINDOW_DESKTOP)
{
menu = wnck_action_menu_new (window);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
- event->button, event->time);
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent*)event);
return TRUE;
}
}
diff --git a/mate-window-picker-applet/task-title.h b/mate-window-picker-applet/task-title.h
index 5161a9d..d87786b 100644
--- a/mate-window-picker-applet/task-title.h
+++ b/mate-window-picker-applet/task-title.h
@@ -23,6 +23,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#define TASK_TYPE_TITLE (task_title_get_type ())