This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting the gui branch to show windows again


On Sat, 2004-10-09 at 19:29, Mark Wielaard wrote:
> Hi,
> 
> I updated my gui branch after a week or two and it stopped working.
> I use the following patchlet/workaround to get it to show windows again.
> 
> --- gnu_java_awt_peer_gtk_GtkWindowPeer.c       7 Oct 2004 22:11:59 -0000       1.24.2.16
> +++ gnu_java_awt_peer_gtk_GtkWindowPeer.c       9 Oct 2004 23:23:41 -0000
> @@ -413,7 +413,7 @@
> 
>    /* Check if the current window manager supports
>       _NET_REQUEST_FRAME_EXTENTS. */
> -  if (gdk_net_wm_supports (request_extents))
> +  if (gdk_net_wm_supports (request_extents) && window->window != NULL)
>      {
>        GdkDisplay *display = gtk_widget_get_display (window);
>        Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
> 
> Without this the followin in GtkWindowPeer fails:
>       unsigned long window_id = GDK_WINDOW_XID (GDK_DRAWABLE(window->window));
> with
> (:6725): Gdk-WARNING **: /home/mark/sources/gtk+/gdk/x11/gdkdrawable-x11.c:912 drawable is not a pixmap or window
> 
> Does this make sense to anyone?
> 

Yes.  I didn't retest with a window manager that supports
_NET_REQUEST_FRAME_EXTENTS before committing my patch that delayed
window realization.  I'll have to move this window sizing logic into the
"realize" signal's callback chain so that I'm sure that window->window
is non-NULL when I make the request to the window manager.

Could you file a bug for this?

Thanks,
Tom



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]