Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mstr2 committed Oct 17, 2024
1 parent 2b303ff commit 575fcfd
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions modules/javafx.graphics/src/main/native-glass/gtk/glass_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1430,10 +1430,12 @@ void WindowContextTop::process_mouse_button(GdkEventButton* event) {

// Clicking on a window edge starts a move-resize operation.
if (shouldStartResizeDrag) {
// Send a synthetic PRESS + RELEASE to FX, which will dismiss open popup windows.
// WindowContextBase::process_mouse_button(event);
// event->type = GDK_BUTTON_RELEASE;
// WindowContextBase::process_mouse_button(event);
// Send a synthetic PRESS + RELEASE to FX. This allows FX to do things that need to be done
// prior to resizing the window, like closing a popup menu. We do this because we won't be
// sending events to FX once the resize operation has started.
WindowContextBase::process_mouse_button(event);
event->type = GDK_BUTTON_RELEASE;
WindowContextBase::process_mouse_button(event);

gint rx = 0, ry = 0;
gdk_window_get_root_coords(get_gdk_window(), event->x, event->y, &rx, &ry);
Expand All @@ -1447,10 +1449,10 @@ void WindowContextTop::process_mouse_button(GdkEventButton* event) {

// Clicking on a draggable area starts a move-drag operation.
if (shouldStartMoveDrag) {
// Send a synthetic PRESS + RELEASE to FX, which will dismiss open popup windows.
// WindowContextBase::process_mouse_button(event);
// event->type = GDK_BUTTON_RELEASE;
// WindowContextBase::process_mouse_button(event);
// Send a synthetic PRESS + RELEASE to FX.
WindowContextBase::process_mouse_button(event);
event->type = GDK_BUTTON_RELEASE;
WindowContextBase::process_mouse_button(event);

gint rx = 0, ry = 0;
gdk_window_get_root_coords(get_gdk_window(), event->x, event->y, &rx, &ry);
Expand Down

0 comments on commit 575fcfd

Please sign in to comment.