xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 1 of Ticket #705


Ignore:
Timestamp:
10/28/14 14:05:52 (6 years ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #705

    • Property Owner changed from Antoine Martin to Antoine Martin
    • Property Priority changed from major to critical
    • Property Status changed from new to assigned
    • Property Summary changed from some JOGL windows get mapped incorrectly and appear blank or the wrong size to Java applications running with JDK6 or older can produce windows 1 pixel high
  • Ticket #705 – Description

    initial v1  
    1 Not fully documented build instructions (building demos is missing from their website):
     1Attached is a very simple test case.
    22{{{
    3 mkdir jogamp;cd jogamp
    4 git clone git://github.com/sgothel/gluegen.git gluegen
    5 git clone git://github.com/sgothel/jogl.git jogl
    6 git clone git://jogamp.org/srv/scm/joal.git joal
    7 git clone git://github.com/sgothel/jogl-demos.git jogl-demos
    8 for d in gluegen jogl joal jogl-demos; do
    9     pushd $d/make
    10     ant
    11     popd
    12 done
    13 }}}
    14 Then you can run some of the tests:
    15 {{{
    16 cd jogl-demos/build/classes/
    17 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../../gluegen/build/obj/ \
    18     java -Dsun.java2d.opengl=true \
    19     -cp ../../../jogl/build/jar/jogl-all.jar:../../../gluegen/build/gluegen.jar:../jogl-demos.jar \
    20     demos.GLInfo
     3export JAVA_HOME=/opt/jdk1.6
     4$JAVA_HOME/bin/javac Main.java
     5$JAVA_HOME/bin/java Main
    216}}}
    227
    23 I can't reproduce it now, but I've seen it.
     8Click on the button and the dialog window appears correctly, close it and try again and it gets mapped as a 1 pixel high window..
     9
     10I have tested many versions of Java, including the IBM SDK, opensdk, Sun's SDK, etc..
     11This only affects Java 6 and earlier. (which is the version supported in centos 5 and some centos 6 installations..)
     12
     13r7959 added {{{CreateNotify}}} support for X11 event logging since the window seemed to be configured wrong by the time we get notified.
     14* logging window creation the first time (correct - summary):
     15{{{
     16Reconfigure on withdrawn window (190,70)
     17x_event_filter event=(None, 'child-map-request-event')/MapRequest window=0x16d
     18Found a potential client
     19new window 0xa0001e
     20_read_initial_properties: geometry=(0, 0, 190, 70, 24)
     21_update_client_geometry: using initial size=(190, 70) and position=(0, 0)
     22_do_update_client_geometry: sanitized hints=WMSizeHints({'set_initial_position': True, 'win_gravity': 1})
     23Discovered new ordinary window: WindowModel(0xa0001e - " ") (geometry=(0, 0, 190, 70))
     24found transient_for=<gtk.gdk.Window object at 0x7f9c3c0923c0 (GdkWindow at 0x16f85a0)>, xid=0xa00007
     25new_window(new-window, WindowModel(0xa0001e - " "), 5, 0, 0, 190, 70, None) \
     26    metadata={'opacity': -1, 'size-constraints': {'set-initial-position': True}, \
     27    'window-type': ['DIALOG'], 'client-machine': 'laptop', 'xid': '0xa0001e', \
     28    'title': ' ', 'transient-for': 4, 'icon-title': 'Java', 'pid': -1, 'group-leader-xid': 10485767}
     29x_event_filter event=(None, 'child-map-request-event')/MapRequest took 29.4ms
     30client configured window 5 - WindowModel(0xa0001e - " "), at: (0, 0, 190, 70)
     31}}}
     32* second time around (buggy):
     33{{{
     34Reconfigure on withdrawn window (1,1)
     35x_event_filter event=(None, 'child-map-request-event')/MapRequest window=0x16d
     36Found a potential client
     37new window 0xa0002c
     38_read_initial_properties: geometry=(0, 0, 1, 1, 24)
     39_update_client_geometry: using initial size=(1, 1) and position=(0, 0)
     40_do_update_client_geometry: sanitized hints=WMSizeHints({'set_initial_position': True, 'win_gravity': 1})
     41Discovered new ordinary window: WindowModel(0xa0002c - " ") (geometry=(0, 0, 1, 1))
     42found transient_for=<gtk.gdk.Window object at 0x7f9c3c0923c0 (GdkWindow at 0x16f85a0)>, xid=0xa00007
     43new_window(new-window, WindowModel(0xa0002c - " "), 6, 0, 0, 1, 1, None) \
     44    metadata={'opacity': -1, 'size-constraints': {'set-initial-position': True}, \
     45    'window-type': ['DIALOG'], 'client-machine': 'laptop', 'xid': '0xa0002c', \
     46    'title': ' ', 'transient-for': 4, 'icon-title': 'Java', 'pid': -1, 'group-leader-xid': 10485767}
     47x_event_filter event=(None, 'child-map-request-event')/MapRequest took 30.4ms
     48client configured window 6 - WindowModel(0xa0002c - " "), at: (0, 0, 1, 1)
     49}}}
     50
     51So the problem occurs very early on, when we read the window's initial dimensions.
     52It looks like Java is caching something (in one of its numerous hidden event windows?) which causes the new dialog window to inherit the wrong size. During a reparent maybe?
     53This obviously does not happen with other window managers, so we must be doing something wrong.
     54
     55
     56This ticket was originally recorded as a JOGL bug - but as can be seen in the example code, that was wrong, JOGL has nothing to do with it.