summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorÉtienne Deparis <[email protected]>2019-04-03 19:59:28 +0200
committerraveit65 <[email protected]>2019-05-10 10:18:54 +0200
commit8e80c503c4ad85f24b01940f8ab8cdfe0f443e3e (patch)
tree823d9eef0b80d0344a0a9ab95e4143de2f9deb3d /mate-window-picker-applet
parentc43e19cd54629726c05c6f6a89f9ce2ff8521501 (diff)
downloadmate-netbook-8e80c503c4ad85f24b01940f8ab8cdfe0f443e3e.tar.bz2
mate-netbook-8e80c503c4ad85f24b01940f8ab8cdfe0f443e3e.tar.xz
Remove a runtime error due to event->time sending buggy values
Diffstat (limited to 'mate-window-picker-applet')
-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 ())