[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Java solution - kind of
From:       Matthias Ettrich <ettrich () trolltech ! com>
Date:       2001-03-29 17:22:01
[Download RAW message or body]


I commited the following patch to kwin, to improve interoperability with 
Sun's latest JDK offerings (1.3.x).

Java is totally weird. I believe their setSize() call tries to set the size 
of a window _including_ the wm frame. To do so on X, they have to have 
hundreds of lines of weird hacks in the JVM, with special code for every 
windowmanager.  Well, _NET_KDE_FRAME_STRUT is really all they need, if it 
only had existed before and was supported by all wms ....

My patch tells the JDK that it's running under CDE.  CDE's behaviour is much 
closer to kwin than what they assume otherwise.

Index: atoms.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/atoms.cpp,v
retrieving revision 1.14
diff -u -r1.14 atoms.cpp
--- atoms.cpp   2001/03/19 15:35:07     1.14
+++ atoms.cpp   2001/03/29 17:14:39
@@ -44,6 +44,10 @@
 
     atoms[n] = &kde_wm_change_state;
     names[n++] = (char *) "_KDE_WM_CHANGE_STATE";
+
+    Atom fake;
+    atoms[n] = &fake;
+    names[n++] = (char *) "DT_SM_WINDOW_INFO";
 
     XInternAtoms( qt_xdisplay(), names, n, FALSE, atoms_return );
     for (int i = 0; i < n; i++ )


Not that this still isn't perfect. The first two windows will have slightly 
the wrong size, until java finally guesses the right frame geometry.

Matthias

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic