Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3421,22 +3421,22 @@ int gtk_gesture_press_event (long gesture, int n_press, double x, double y, long
if (!cancelled) {
result = GTK4.GTK_EVENT_SEQUENCE_CLAIMED;
}
if ((state & MENU) != 0) {
if (eventButton == 3) {
if (eventButton == 3) {
if ((state & MENU) != 0 || menu != null) {
if (showMenu ((int)x, (int)y)) {
result = GTK4.GTK_EVENT_SEQUENCE_CLAIMED;
}
}
}
} else if (n_press >= 2) {
boolean cancelled = sendMouseEvent(SWT.MouseDoubleClick, eventButton, n_press, 0, false, eventTime, x, y, false, eventState);
//Issue 344, DoubleClick event currently unsupported below sendMouseEvent(). Until DoubleClickSupport is

//Issue 344, DoubleClick event currently unsupported below sendMouseEvent(). Until DoubleClickSupport is
//added this will catch failed events and try MouseDown instead.
if (cancelled) {
cancelled = sendMouseEvent(SWT.MouseDown, eventButton, n_press, 0, false, eventTime, x, y, false, eventState);
}

if (!cancelled) {
result = GTK4.GTK_EVENT_SEQUENCE_CLAIMED;
}
Expand Down Expand Up @@ -4240,18 +4240,10 @@ long gtk_motion_notify_event (long widget, long event) {
}

@Override
long gtk_popup_menu (long widget) {
long gtk3_popup_menu (long widget) {
if (!hasFocus()) return 0;
int [] x = new int [1], y = new int [1];
if (GTK.GTK4) {
/*
* TODO: calling gdk_window_get_device_position() with a 0
* for the GdkWindow uses gdk_get_default_root_window(),
* which doesn't exist on GTK4.
*/
} else {
display.getWindowPointerPosition (0, x, y, null);
}
display.getWindowPointerPosition (0, x, y, null);
return showMenu (x [0], y [0], SWT.MENU_KEYBOARD) ? 1 : 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ long gtk_populate_popup (long widget, long menu) {
return 0;
}

long gtk_popup_menu (long widget) {
long gtk3_popup_menu (long widget) {
return 0;
}

Expand Down Expand Up @@ -2592,7 +2592,7 @@ long windowProc (long handle, long user_data) {
case MAP: return gtk_map (handle);
case MONTH_CHANGED: return gtk_month_changed (handle);
case OUTPUT: return gtk_output (handle);
case POPUP_MENU: return gtk_popup_menu (handle);
case POPUP_MENU: return gtk3_popup_menu (handle);
case PREEDIT_CHANGED: return gtk_preedit_changed (handle);
case REALIZE: return gtk_realize (handle);
case START_INTERACTIVE_SEARCH: return gtk_start_interactive_search (handle);
Expand Down
Loading