OSDN Git Service

2003-12-01 Thomas Fitzsimmons <fitzsim@redhat.com>
authorfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Dec 2003 23:27:06 +0000 (23:27 +0000)
committerfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Dec 2003 23:27:06 +0000 (23:27 +0000)
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(awt_event_handler): Hard-code inset values.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74136 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c

index 663bd05..e05f47d 100644 (file)
@@ -1,5 +1,8 @@
 2003-12-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
+       * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
+       (awt_event_handler): Hard-code inset values.
+
        * gnu/java/awt/peer/gtk/GdkFontMetrics.java (GdkFontMetrics):
        Pass font name, not XLFD, to initState.
        (stringWidth(String, int, String)): New method.
index 563492a..74939f8 100644 (file)
@@ -1022,8 +1022,6 @@ awt_event_handler (GdkEvent *event)
            if (widget && GTK_WIDGET_TOPLEVEL (widget))
              {
                gint top, left, right, bottom;
-               gint x, y, w, h, d;
-               GdkRectangle r;
 
                /* Configure events are not posted to the AWT event
                   queue, and as such, the gdk/gtk peer functions will
@@ -1031,20 +1029,11 @@ awt_event_handler (GdkEvent *event)
                   returns. */
                gdk_threads_leave ();
 
-               /* Calculate our insets. */
-
-               /* When called from within the gdk_threads critical
-                  section these functions seem to return strange
-                  results, so we call them after
-                  gdk_threads_leave. */
-               gdk_window_get_geometry (event->any.window,
-                                        &x, &y, &w, &h, &d);
-               gdk_window_get_frame_extents (event->any.window, &r);
-
-               top = y;
-               left = x;
-               bottom = r.height - h - y;
-               right = r.width - w - x;
+               /* FIXME: hard-code these values for now. */
+               top = 20;
+               left = 6;
+               bottom = 6;
+               right = 6;
 
                (*gdk_env)->CallVoidMethod (gdk_env, *event_obj_ptr,
                                            postConfigureEventID,