X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1f448eeefd90163fedd9134f35203afe51200c6..fe164c3e2ea5453896cd63a5440a26365daec1bc:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index ee418a7c17..9ca920d581 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -255,10 +255,6 @@ wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL; // send any activate events at all static int g_sendActivateEvent = -1; -/* hack: we need something to pass to gtk_menu_popup, so we store the time of - the last click here */ -static guint32 gs_timeLastClick = 0; - extern bool g_mainThreadLocked; //----------------------------------------------------------------------------- @@ -1586,8 +1582,6 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, if ( !g_captureWindow ) win = FindWindowForMouseEvent(win, event.m_x, event.m_y); - gs_timeLastClick = gdk_event->time; - /* wxPrintf( wxT("2) OnButtonPress from ") ); if (win->GetClassInfo() && win->GetClassInfo()->GetClassName()) @@ -4217,7 +4211,11 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y ) wxPopupMenuPositionCallback, // function to position it NULL, // client data 0, // button used to activate it - gs_timeLastClick // the time of activation +#ifdef __WXGTK20__ + gtk_get_current_event_time() +#else + GDK_CURRENT_TIME +#endif ); while (is_waiting)