xpra icon
Bug tracker and wiki

Opened 6 years ago

Last modified 6 years ago

#705 closed defect

Java applications running with JDK6 or older can produce windows 1 pixel high — at Version 1

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: critical Milestone: 0.15
Component: core Version: trunk
Keywords: Cc: hd.akbarpour@…

Description (last modified by Antoine Martin)

Attached is a very simple test case.

export JAVA_HOME=/opt/jdk1.6
$JAVA_HOME/bin/javac Main.java 
$JAVA_HOME/bin/java Main 

Click on the button and the dialog window appears correctly, close it and try again and it gets mapped as a 1 pixel high window..

I have tested many versions of Java, including the IBM SDK, opensdk, Sun's SDK, etc..
This only affects Java 6 and earlier. (which is the version supported in centos 5 and some centos 6 installations..)

r7959 added CreateNotify support for X11 event logging since the window seemed to be configured wrong by the time we get notified.

  • logging window creation the first time (correct - summary):
    Reconfigure on withdrawn window (190,70)
    x_event_filter event=(None, 'child-map-request-event')/MapRequest window=0x16d
    Found a potential client
    new window 0xa0001e
    _read_initial_properties: geometry=(0, 0, 190, 70, 24)
    _update_client_geometry: using initial size=(190, 70) and position=(0, 0)
    _do_update_client_geometry: sanitized hints=WMSizeHints({'set_initial_position': True, 'win_gravity': 1})
    Discovered new ordinary window: WindowModel(0xa0001e - " ") (geometry=(0, 0, 190, 70))
    found transient_for=<gtk.gdk.Window object at 0x7f9c3c0923c0 (GdkWindow at 0x16f85a0)>, xid=0xa00007
    new_window(new-window, WindowModel(0xa0001e - " "), 5, 0, 0, 190, 70, None) \
        metadata={'opacity': -1, 'size-constraints': {'set-initial-position': True}, \
        'window-type': ['DIALOG'], 'client-machine': 'laptop', 'xid': '0xa0001e', \
        'title': ' ', 'transient-for': 4, 'icon-title': 'Java', 'pid': -1, 'group-leader-xid': 10485767}
    x_event_filter event=(None, 'child-map-request-event')/MapRequest took 29.4ms
    client configured window 5 - WindowModel(0xa0001e - " "), at: (0, 0, 190, 70)
    
  • second time around (buggy):
    Reconfigure on withdrawn window (1,1)
    x_event_filter event=(None, 'child-map-request-event')/MapRequest window=0x16d
    Found a potential client
    new window 0xa0002c
    _read_initial_properties: geometry=(0, 0, 1, 1, 24)
    _update_client_geometry: using initial size=(1, 1) and position=(0, 0)
    _do_update_client_geometry: sanitized hints=WMSizeHints({'set_initial_position': True, 'win_gravity': 1})
    Discovered new ordinary window: WindowModel(0xa0002c - " ") (geometry=(0, 0, 1, 1))
    found transient_for=<gtk.gdk.Window object at 0x7f9c3c0923c0 (GdkWindow at 0x16f85a0)>, xid=0xa00007
    new_window(new-window, WindowModel(0xa0002c - " "), 6, 0, 0, 1, 1, None) \
        metadata={'opacity': -1, 'size-constraints': {'set-initial-position': True}, \
        'window-type': ['DIALOG'], 'client-machine': 'laptop', 'xid': '0xa0002c', \
        'title': ' ', 'transient-for': 4, 'icon-title': 'Java', 'pid': -1, 'group-leader-xid': 10485767}
    x_event_filter event=(None, 'child-map-request-event')/MapRequest took 30.4ms
    client configured window 6 - WindowModel(0xa0002c - " "), at: (0, 0, 1, 1)
    

So the problem occurs very early on, when we read the window's initial dimensions.
It 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?
This obviously does not happen with other window managers, so we must be doing something wrong.

This 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.

Change History (1)

comment:1 Changed 6 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Antoine Martin
Priority: majorcritical
Status: newassigned
Summary: some JOGL windows get mapped incorrectly and appear blank or the wrong sizeJava applications running with JDK6 or older can produce windows 1 pixel high
Note: See TracTickets for help on using tickets.