Bug 17952 - Windows don't show with window manager that supports _NET_REQUEST_FRAME_EXTENTS
Summary: Windows don't show with window manager that supports _NET_REQUEST_FRAME_EXTENTS
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: pre-0.18
Assignee: Thomas Fitzsimmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-12 18:14 UTC by Mark Wielaard
Modified: 2005-10-16 01:54 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-11 02:45:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2004-10-12 18:14:11 UTC
With window managers that support _NET_REQUEST_FRAME_EXTENTS no AWT (or Swing)
windows ever show. There is only the following error message.

(:6725): Gdk-WARNING **: /home/mark/sources/gtk+/gdk/x11/gdkdrawable-x11.c:912
drawable is not a pixmap or window

This was caused by the patch that delayed window realization.  The window sizing
logic should be moved into the "realize" signal's callback chain so that we are
sure that window->window is non-NULL when I make the request to the window manager.

See also this email thread:
http://gcc.gnu.org/ml/java-patches/2004-q4/msg00090.html
Comment 1 GCC Commits 2004-10-12 19:07:53 UTC
Subject: Bug 17952

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	java-gui-branch
Changes by:	mark@gcc.gnu.org	2004-10-12 19:07:48

Modified files:
	libjava        : ChangeLog 
	libjava/jni/gtk-peer: gnu_java_awt_peer_gtk_GtkWindowPeer.c 

Log message:
	Workaround for bug #17952.
	*  jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(request_frame_extents): Check window->window != NULL.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=java-gui-branch&r1=1.2660.2.452&r2=1.2660.2.453
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c.diff?cvsroot=gcc&only_with_tag=java-gui-branch&r1=1.24.2.16&r2=1.24.2.17

Comment 2 Thomas Fitzsimmons 2005-02-08 16:30:40 UTC
Fixed on java-gui-branch.
Comment 3 Thomas Fitzsimmons 2005-02-21 00:13:45 UTC
This wasn't actually fixed by the merge.
Comment 4 Andrew Pinski 2005-02-21 00:35:02 UTC
Only a work around was applied. 
Which is why it still says:
        "Workaround for bug #17952."
Comment 5 Thomas Fitzsimmons 2005-02-21 00:54:52 UTC
Yeah, this was a mistake on my part.  I thought the bug had been fixed by the
merge but it wasn't.
Comment 6 GCC Commits 2005-02-22 06:13:27 UTC
Subject: Bug 17952

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fitzsim@gcc.gnu.org	2005-02-22 06:13:05

Modified files:
	libjava        : ChangeLog 
	libjava/gnu/java/awt/peer/gtk: GtkWindowPeer.java 
	libjava/jni/gtk-peer: gnu_java_awt_peer_gtk_GtkToolkit.c 
	                      gnu_java_awt_peer_gtk_GtkWindowPeer.c 
	                      gtkpeer.h 

Log message:
	2005-02-22  Thomas Fitzsimmons  <fitzsim@redhat.com>
	
	PR libgcj/17952:
	* gnu/java/awt/peer/gtk/GtkWindowPeer.java,
	jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
	(getWidth): New method.
	(getHeight): Likewise.
	(create): Remove width, height and insets parameters.  Move size
	setup ...
	(realize_cb): ... here.  New function.
	(connectSignals): Connect realize_cb.
	(request_frame_extents): Remove FIXME.  Move
	postInsetsChangedEvent lookup ...
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c (gtkInit):
	... here.  Look up GtkWindowPeer getWidth and getHeight methods.
	* jni/gtk-peer/gtkpeer.h (postInsetsChangedEventID): Declare
	jmethodID.
	(windowGetWidthID): Likewise.
	(windowGetHeightID): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3373&r2=1.3374
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gnu/java/awt/peer/gtk/GtkWindowPeer.java.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c.diff?cvsroot=gcc&r1=1.32&r2=1.33
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/jni/gtk-peer/gtkpeer.h.diff?cvsroot=gcc&r1=1.18&r2=1.19

Comment 7 Thomas Fitzsimmons 2005-02-22 06:22:11 UTC
Fixed on mainline.