/[classpath]/classpath/gnu/java/awt/peer/gtk/GtkFramePeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/gtk/GtkFramePeer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by fitzsim, Fri Aug 19 01:29:26 2005 UTC revision 1.41 by fitzsim, Thu Aug 25 02:26:49 2005 UTC
# Line 62  public class GtkFramePeer extends GtkWin Line 62  public class GtkFramePeer extends GtkWin
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);
# Line 123  public class GtkFramePeer extends GtkWin Line 121  public class GtkFramePeer extends GtkWin
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    
# Line 215  public class GtkFramePeer extends GtkWin Line 212  public class GtkFramePeer extends GtkWin
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

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26