1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

Bugfix: java menu problem after resize, maximize

From the original report by Tamas Teves:

   "i'm having (and have, for a long time) problems with openoffice and
   java-based (perhaps only netbeans-based?) apps.

   for openoffice, any menu opens in the far right edge (with xinerama,
   on the far right edge of the rightmost display) of the display. it
   then can be clicked and operated corretly where it appears.

   as for netbeans (and jswat, which also uses netbeans platform as a
   base), it's a bit more complicated, but let me try to describe. start
   netbeans so that it is not maximized and not in the upper left of the
   display. it works fine. move it around, still works fine, resize,
   still works fine. now if i maximize it (not by moving to the upper
   left corner and resizing, but by the maximize shortcut), then the
   menus start acting weird. it seems that the actual position of the
   mouse pointer and the hot spot of the mouse pointer get "out of sync"
   so to speak, as if the hot spot stayed where the window was before
   maximization.

   i've made a capture which hopefully better shows what i'm trying to
   say. this is a netbeans window maximized, while i'm trying to click
   tools->options. the left mouse button must always be held down, or
   else it instantly loses any interaction with the menus (in the capture
   i released it once when i completely lost track of where i might be).

   the capture is available at http://dawn.dev.hu/~ice/tmp/wmjava.avi

   i'm not sure whether java stuff other than those based on netbeans
   platform exhibit this behaviour. i've seen this with at least one
   other nb platform stuff as well."

The fix is to call wWindowSynthConfigureNotify() after wWindowConfigure()
This commit is contained in:
Ambrus Szabo
2011-04-05 12:36:11 +02:00
committed by Carlos R. Mafra
parent a750fe03f4
commit 7490b14bf0
2 changed files with 3 additions and 0 deletions

View File

@@ -388,6 +388,7 @@ void wMaximizeWindow(WWindow *wwin, int directions)
usableArea.y2 - usableArea.y1, &new_width, &new_height);
wWindowConfigure(wwin, new_x, new_y, new_width, new_height);
wWindowSynthConfigureNotify(wwin);
WMPostNotificationName(WMNChangedState, wwin, "maximize");
@@ -540,6 +541,7 @@ void wUnmaximizeWindow(WWindow *wwin)
wwin->flags.maximized = 0;
wWindowConfigure(wwin, x, y, w, h);
wWindowSynthConfigureNotify(wwin);
WMPostNotificationName(WMNChangedState, wwin, "maximize");
}

View File

@@ -2077,6 +2077,7 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
}
wWindowConfigure(wwin, fx, fy, fw, fh - vert_border);
wWindowSynthConfigureNotify(wwin);
}
return;