Commited this.

On Thu, 2006-08-03 at 08:35 +0200, Sven de Marothy wrote:
> This should fix PR #16203, and also make for a general improvement.
> 
> In short: The main GTK loop is not started statically in GtkToolkit,
> but rather on creating the first window peer. (as it should be).
> 
> In long:
> On destroying the last window peer, we call gtk to end the main
> loop and the thread exits. If a new window is opened, we create
> a new thread object and restart the main gtk loop.
> 
> I also moved all the stuff related to this (except native methods) 
> out from GtkToolkit and into a new GtkMainThread class. This should
> help reduce the clutter in the already ugly GtkToolkit class.
> 
> It seems to work just fine for me, but being a rather central thing
> I'd like some feedback and testing before committing it.
> (Obviously not intended for the 0.92 release)
> 
> /Sven
> 
> 2006-08-03  Sven de Marothy  <[EMAIL PROTECTED]>
> 
> * gnu/java/awt/peer/gtk/GtkMainThread.java
> New file.
> * gnu/java/awt/peer/gtk/GtkChoicePeer.java
> * gnu/java/awt/peer/gtk/GtkComponentPeer.java
> Replace occurances of GtkToolkit.mainThread to GtkMainThread.mainThread.
> * gnu/java/awt/peer/gtk/GtkToolkit.java
> Minor style fixes; removed unused fields, 
> set fields to private where possible.
> (createDialog, createFrame, createWindow, createEmbeddedWindow): 
> Call GtkMainThread.createWindow().
> * gnu/java/awt/peer/gtk/GtkWindowPeer.java
> (dispose): New method.
> * include/gnu_java_awt_peer_gtk_GtkToolkit.h
> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
> (gtkQuit): New native method.



Reply via email to