gmenu.cpp (gambas-3.16.2.tar.bz2) | : | gmenu.cpp (gambas-3.16.3.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 860 | skipping to change at line 860 | |||
_in_popup++; | _in_popup++; | |||
_popup_count++; | _popup_count++; | |||
_exec = true; | _exec = true; | |||
#if GTK_CHECK_VERSION(3, 22, 0) | #if GTK_CHECK_VERSION(3, 22, 0) | |||
GdkWindow *win; | GdkWindow *win; | |||
GdkRectangle rect; | GdkRectangle rect; | |||
GdkEvent *event; | GdkEvent *event; | |||
GdkEvent *last_event; | ||||
gt_disable_warnings(true); | gt_disable_warnings(true); | |||
event = gdk_event_new(GDK_BUTTON_PRESS); | event = gdk_event_new(GDK_BUTTON_PRESS); | |||
event->button.time = gApplication::lastEventTime(); //GDK_CURRENT_TIME; | event->button.time = gApplication::lastEventTime(); //GDK_CURRENT_TIME; | |||
event->button.button = 1; | ||||
event->button.window = gtk_widget_get_window(window()->border); | last_event = gApplication::lastEvent(); | |||
if (last_event && last_event->type == GDK_BUTTON_PRESS) | ||||
{ | ||||
event->button.button = last_event->button.button; | ||||
event->button.window = last_event->button.window; | ||||
} | ||||
else | ||||
{ | ||||
event->button.button = 1; | ||||
event->button.window = gtk_widget_get_window(window()->border); | ||||
} | ||||
gdk_event_set_device(event, gMouse::getPointer()); | gdk_event_set_device(event, gMouse::getPointer()); | |||
if (move) | if (move) | |||
{ | { | |||
win = gdk_event_get_window(event); | win = gdk_event_get_window(event); | |||
gdk_window_get_origin(win, &rect.x, &rect.y); | gdk_window_get_origin(win, &rect.x, &rect.y); | |||
rect.x = x - rect.x; | rect.x = x - rect.x; | |||
rect.y = y - rect.y; | rect.y = y - rect.y; | |||
rect.width = rect.height = 1; | rect.width = rect.height = 1; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 14 lines changed or added |