GtkButtonPeer.java (handleEvent): Remove modality check.
2003-10-08 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkButtonPeer.java (handleEvent): Remove modality check. * gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets): Initialize insets to use latest insets. * gnu/java/awt/peer/gtk/GtkFramePeer.java: Likewise. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (latestInsets): New field. (postConfigureEvent): Update latestInsets field when insets change. Remove call to setSize. Move validate call outside of if blocks. (setVisible): Call setBounds before showing window. (nativeSetVisible): New native method. * java/awt/Window.java (show): Show visible owned windows. (hide): Hide visible owned windows. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler): Implement modality using GTK grabs. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (global_gtk_window_group): New global variable. (gtkInit): Initialize global_gtk_window_group. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create): Clamp width and height values to at least 1. Add this window to the global GTK window group. (setVisible): Rename to nativeSetVisible. (setup_window): Remove function. (setSize): Clamp width and height values to at least 1. (nativeSetBounds): Likewise. (gdk_window_get_root_geometry): Remove function. * jni/gtk-peer/gtkpeer.h: Remove gdk_window_get_root_geometry and setup_window declarations. Declare global_gtk_window_group. From-SVN: r72252
This commit is contained in:
parent
ba401f2f1f
commit
23a555b077
10 changed files with 185 additions and 123 deletions
|
@ -209,7 +209,8 @@ public class Window extends Container implements Accessible
|
|||
}
|
||||
|
||||
/**
|
||||
* Makes this window visible and brings it to the front.
|
||||
* Shows on-screen this window and any of its owned windows for whom
|
||||
* isVisible returns true.
|
||||
*/
|
||||
public void show()
|
||||
{
|
||||
|
@ -218,13 +219,7 @@ public class Window extends Container implements Accessible
|
|||
if (peer == null)
|
||||
addNotify();
|
||||
|
||||
validate();
|
||||
super.show();
|
||||
toFront();
|
||||
}
|
||||
|
||||
public void hide()
|
||||
{
|
||||
// Show visible owned windows.
|
||||
synchronized (ownedWindows)
|
||||
{
|
||||
Iterator e = ownedWindows.iterator();
|
||||
|
@ -232,7 +227,10 @@ public class Window extends Container implements Accessible
|
|||
{
|
||||
Window w = (Window)(((Reference) e.next()).get());
|
||||
if (w != null)
|
||||
w.hide();
|
||||
{
|
||||
if (w.isVisible())
|
||||
w.getPeer().setVisible(true);
|
||||
}
|
||||
else
|
||||
// Remove null weak reference from ownedWindows.
|
||||
// Unfortunately this can't be done in the Window's
|
||||
|
@ -241,7 +239,29 @@ public class Window extends Container implements Accessible
|
|||
e.remove();
|
||||
}
|
||||
}
|
||||
validate();
|
||||
super.show();
|
||||
toFront();
|
||||
}
|
||||
|
||||
public void hide()
|
||||
{
|
||||
// Hide visible owned windows.
|
||||
synchronized (ownedWindows)
|
||||
{
|
||||
Iterator e = ownedWindows.iterator();
|
||||
while(e.hasNext())
|
||||
{
|
||||
Window w = (Window)(((Reference) e.next()).get());
|
||||
if (w != null)
|
||||
{
|
||||
if (w.isVisible() && w.getPeer() != null)
|
||||
w.getPeer().setVisible(false);
|
||||
}
|
||||
else
|
||||
e.remove();
|
||||
}
|
||||
}
|
||||
super.hide();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue