<AWT Dev> <Awt Dev> [9] Review Request for 8141528: Test closed/java/awt/FullScreen/DisplayMode/CycleDMImage.java fails for Ubuntu 15.10

Semyon Sadetsky semyon.sadetsky at oracle.com
Mon Dec 14 07:36:34 UTC 2015



On 12/10/2015 7:37 PM, Semyon Sadetsky wrote:
>
>
> On 12/10/2015 7:02 PM, Sergey Bylokhov wrote:
>> On 10/12/15 18:45, Semyon Sadetsky wrote:
>>>
>>>
>>> On 12/10/2015 5:50 PM, Sergey Bylokhov wrote:
>>>> On 09/12/15 10:21, Semyon Sadetsky wrote:
>>>>>
>>>>>
>>>>> On 12/8/2015 10:36 PM, Sergey Bylokhov wrote:
>>>>>> On 08/12/15 22:07, Semyon Sadetsky wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 12/8/2015 9:11 PM, Sergey Bylokhov wrote:
>>>>>>>> On 08.12.15 21:03, Semyon Sadetsky wrote:
>>>>>>>>> The test fails on Ubuntu 14 as well. It only was discovered on
>>>>>>>>> Ubunu 15
>>>>>>>>> by QA.
>>>>>>>>
>>>>>>>> In the bug description they said that it passes on Ubuntu 14.04. I
>>>>>>>> guess this is the reason why it was filed only now.
>>>>>>> On my Ubuntu 14.04 it doesn't pass because of the same reason. Also
>>>>>>> I've
>>>>>>> read the same complains in the I-net. Can you confirm that your 
>>>>>>> Ubuntu
>>>>>>> 14 passes the test?
>>>>>>
>>>>>> The system on which it is passed is provided in the description.
>>>>> This system you are talking about is not an Ubuntu 14. It uses
>>>>> another WM:
>>>>>
>>>>> gtee at stt-137:/export/local/aurora/sandbox$ export | grep DESKTOP
>>>>> declare -x DESKTOP_SESSION="gnome"
>>>>> declare -x GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
>>>>> declare -x XDG_CURRENT_DESKTOP="GNOME"
>>>>>>
>>>>>>>>
>>>>>>>>> I think this is because Compiz WM takes more control on 
>>>>>>>>> windows for
>>>>>>>>> enhanced effects and does extra work when desktop resolution has
>>>>>>>>> changed.
>>>>>>>>
>>>>>>>> I suggest at least check this with their developers via bug 
>>>>>>>> database.
>>>>>>> Yes, I can file a bug there but not sure that there strict specs 
>>>>>>> for
>>>>>>> that functionality.
>>>>>>> The fix solves the problem on our side for Ubuntu selectively, so
>>>>>>> please
>>>>>>> review it.
>>>>>>
>>>>>> We should at least understand that we have a problem on our side.
>>>>> It is relative... It is better to follow that our customers should 
>>>>> not
>>>>> have problems on their side.
>>>>
>>>> But it is better to understand the problem instead of creating the
>>>> workarounds. For example standalone code below(copied from the jdk)
>>>> works as expected on ubuntu 14.04+unity. But the same code in jdk does
>>>> not work.
>>>>
>>>> #include <X11/Xlib.h>
>>>> #include <strings.h>
>>>> #include <memory.h>
>>>> #include <stdlib.h>
>>>> #include <stdio.h>
>>>>
>>>> int main ()
>>>> {
>>>>     Display* awt_display = XOpenDisplay(NULL);
>>>>     Window win = XCreateSimpleWindow(awt_display,
>>>> RootWindow(awt_display, 0), 0, 0, 10, 10,
>>>>                                      0, BlackPixel (awt_display, 0),
>>>> BlackPixel(awt_display, 0));
>>>>     XMapWindow(awt_display, win);
>>>>     Atom wmState = XInternAtom(awt_display, "_NET_WM_STATE", False);
>>>>     Atom wmStateFs = XInternAtom(awt_display,
>>>>                                  "_NET_WM_STATE_FULLSCREEN", False);
>>>>     XWindowAttributes attr;
>>>>     XEvent event;
>>>>
>>>>     if (wmState == None || wmStateFs == None
>>>>             || !XGetWindowAttributes(awt_display, win, &attr)) {
>>>>         return;
>>>>     }
>>>>
>>>>     memset(&event, 0, sizeof(event));
>>>>     event.xclient.type = ClientMessage;
>>>>     event.xclient.message_type = wmState;
>>>>     event.xclient.display = awt_display;
>>>>     event.xclient.window = win;
>>>>     event.xclient.format = 32;
>>>>     event.xclient.data.l[0] = 1; // 1==add, 0==remove
>>>>     event.xclient.data.l[1] = wmStateFs;
>>>>
>>>>     XSendEvent(awt_display, attr.root, False,
>>>>                SubstructureRedirectMask | SubstructureNotifyMask,
>>>>                &event);
>>>>     XSync(awt_display, False);
>>>>
>>>>     sleep(5);
>>>>     return(0);
>>>>
>>>> }
>>> It looks like you did not fully understand the issue. The problem shows
>>> itself only after the screen with a full screen window is switched to
>>> another resolution.
>>
>> The test which I use to reproduce it in java(similar to native above) 
>> do not change the resolution, it does not work from the beginning:
>>
>> import java.awt.*;
>>
>> public class CycleDMImage extends Component
>> {
>>     static Frame frame;
>>     public static void main(String args[]) throws InterruptedException {
>>
>>         GraphicsDevice gd =
>> GraphicsEnvironment.getLocalGraphicsEnvironment().
>>                         getDefaultScreenDevice();
>>         if (!gd.isFullScreenSupported()) {
>>             System.err.println("FullScreen mode is not supported,"+
>>                     " the test is considered passed.");
>>             return;
>>         }
>>
>>         Frame frame = new Frame();
>>         frame.setSize(400, 400);
>>         frame.setUndecorated(true);
>>         CycleDMImage comp = new CycleDMImage();
>>         frame.add(comp);
>>         frame.setVisible(true);
>>         gd.setFullScreenWindow(frame);
>>         Thread.sleep(5000);
>>         gd.setFullScreenWindow(null);
>>         System.exit(0);
>>     }
>> }
> This is not the original CycleDMImage. It's hard to say why this code 
> is not working on your environment. Probably you need to add delay 
> after the setVisible(). But the original CycleDMImage works.
I have tested the code above on Ubuntu 14 and Ubuntu 15 it just works 
perfectly with and without the fix.
But still, this scenario looks unrelated to the original issue, because 
it doesn't change the screen resolution.
Please clarify what was the reason send it here?
>>
>>
>>>>
>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 12/8/2015 8:37 PM, Sergey Bylokhov wrote:
>>>>>>>>>> Hi, Semyon.
>>>>>>>>>> Can you please provide an additional information why compiz in
>>>>>>>>>> ubuntu
>>>>>>>>>> 15.10 require this. Is it specified/intended behavior or 
>>>>>>>>>> probably a
>>>>>>>>>> bug? since it works on ubuntu 14.04.
>>>>>>>>>>
>>>>>>>>>> On 07.12.15 14:11, Semyon Sadetsky wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> Please review fix for JDK9:
>>>>>>>>>>>
>>>>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8141528
>>>>>>>>>>> webrev: 
>>>>>>>>>>> http://cr.openjdk.java.net/~ssadetsky/8141528/webrev.00/
>>>>>>>>>>>
>>>>>>>>>>> Compiz WM requires override redirect for full-screen window to
>>>>>>>>>>> preserve
>>>>>>>>>>> the full size upon display mode switching.
>>>>>>>>>>>
>>>>>>>>>>> --Semyon
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>



More information about the awt-dev mailing list