62 |
native void removeMenuBarPeer (); |
native void removeMenuBarPeer (); |
63 |
native void gtkFixedSetVisible (boolean visible); |
native void gtkFixedSetVisible (boolean visible); |
64 |
|
|
|
private boolean resizing = false; |
|
|
|
|
65 |
int getMenuBarHeight () |
int getMenuBarHeight () |
66 |
{ |
{ |
67 |
return menuBar == null ? 0 : getMenuBarHeight (menuBar); |
return menuBar == null ? 0 : getMenuBarHeight (menuBar); |
121 |
{ |
{ |
122 |
// prevent window_configure_cb -> awtComponent.setSize -> |
// prevent window_configure_cb -> awtComponent.setSize -> |
123 |
// peer.setBounds -> nativeSetBounds self-deadlock on GDK lock. |
// peer.setBounds -> nativeSetBounds self-deadlock on GDK lock. |
124 |
if (resizing && Thread.currentThread() == GtkToolkit.mainThread) |
if (Thread.currentThread() == GtkToolkit.mainThread) |
125 |
{ |
{ |
126 |
int menuBarWidth = width - insets.left - insets.right; |
int menuBarWidth = width - insets.left - insets.right; |
127 |
if (menuBar != null && menuBarWidth > 0) |
if (menuBar != null && menuBarWidth > 0) |
128 |
setMenuBarWidthUnlocked (menuBar, menuBarWidth); |
setMenuBarWidthUnlocked (menuBar, menuBarWidth); |
129 |
|
|
|
resizing = false; |
|
130 |
return; |
return; |
131 |
} |
} |
132 |
|
|
212 |
|
|
213 |
if (frame_width != awtComponent.getWidth() |
if (frame_width != awtComponent.getWidth() |
214 |
|| frame_height != awtComponent.getHeight()) |
|| frame_height != awtComponent.getHeight()) |
215 |
{ |
awtComponent.setSize(frame_width, frame_height); |
|
resizing = true; |
|
|
awtComponent.setSize(frame_width, frame_height); |
|
|
} |
|
216 |
|
|
217 |
int frame_x = x - insets.left; |
int frame_x = x - insets.left; |
218 |
// Likewise, since insets.top includes the MenuBar height, we need |
// Likewise, since insets.top includes the MenuBar height, we need |