KDE task bar is always on top of fullscreen Java applications

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
Hi!

I have reported this bug that concerns Linux users with KDE 4 window manager. Please vote for it:
https://bugs.kde.org/show_bug.cgi?id=276159

I'm sad because the same bug was annoying me some years ago in GNOME (Metacity), now it is in KDE...
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
Hi!

Can someone explain to me how to tag a window as fullscreen in KDE from Java? Maybe it is done in NEWT. Sven, do you have any piece of information about that?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Rami Santina
Administrator
example to it is found in the unit test:
com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT  line 90

Cheers,
Rami



On Wed, Jun 22, 2011 at 11:16 AM, gouessej [via jogamp]
<[hidden email]> wrote:

> Hi!
>
> Can someone explain to me how to tag a window as fullscreen in KDE from
> Java? Maybe it is done in NEWT. Sven, do you have any piece of information
> about that?
> Julien Gouesse
> http://tuer.sourceforge.net
> http://gouessej.wordpress.com
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.jogamp.org/KDE-task-bar-is-always-on-top-of-fullscreen-Java-applications-tp3088594p3094641.html
> To start a new topic under jogamp, email
> [hidden email]
> To unsubscribe from jogamp, click here.
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Rami Santina
Administrator
In reply to this post by gouessej
as for the bug i dont remember having this issue while testing the FS feature
which version/flavor u using.... i was using Kubuntu 10.04 i guess
Sven tested it on 11.x as well. (since unit tests pass)

Cheers,

On Wed, Jun 22, 2011 at 11:19 AM, Rami Santina <[hidden email]> wrote:

> example to it is found in the unit test:
> com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT  line 90
>
> Cheers,
> Rami
>
>
>
> On Wed, Jun 22, 2011 at 11:16 AM, gouessej [via jogamp]
> <[hidden email]> wrote:
>> Hi!
>>
>> Can someone explain to me how to tag a window as fullscreen in KDE from
>> Java? Maybe it is done in NEWT. Sven, do you have any piece of information
>> about that?
>> Julien Gouesse
>> http://tuer.sourceforge.net
>> http://gouessej.wordpress.com
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://forum.jogamp.org/KDE-task-bar-is-always-on-top-of-fullscreen-Java-applications-tp3088594p3094641.html
>> To start a new topic under jogamp, email
>> [hidden email]
>> To unsubscribe from jogamp, click here.
>
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
This post was updated on .
You tested with NEWT and this bug comes from AWT in my humble opinion. AWT should do this:
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN

If NEWT is not concerned by this bug, it does this thing somewhere. I'm going to look at the source code.

Edit: the solution is in https://github.com/sgothel/jogl/blob/master/src/newt/native/X11Window.c
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Rami Santina
Administrator
AWT in my opinion doesnt have a FS mode for say, whats done there is set window size to max and make it undecorated.
What we did in Newt is request "exclusive" mode for the window.


On Wed, Jun 22, 2011 at 2:01 PM, gouessej [via jogamp] <[hidden email]> wrote:
You tested with NEWT and this bug comes from AWT in my humble opinion.
If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/KDE-task-bar-is-always-on-top-of-fullscreen-Java-applications-tp3088594p3095010.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Sven Gothel
Administrator
On Wednesday, June 22, 2011 01:51:51 PM Rami Santina [via jogamp] wrote:
>
> AWT in my opinion doesnt have a FS mode for say, whats done there is set
> window size to max and make it undecorated.
> What we did in Newt is request "exclusive" mode for the window.

Yup, i.e. seeting a WM hint, using WM communication w/ ATOMs.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
In reply to this post by Rami Santina
Hi!

@Rami Santina
AWT has some sort of FSEM support in java.awt.GraphicsDevice.setFullScreenWindow(Window w):
http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html

Maximizing the window and making it undecorated is a kind of software simulated fullscreen mode which is used as a fallback solution when the real FSEM is not supported on a given platform.

An employee of Oracle who works on AWT confirmed me by email that it is a real bug and it is quite easy to fix.

@Sven Do you allow us to use your source code in AWT please? This bug drives GLCanvas unusable for fullscreen games on some machines (except by using ALT+F3 and enabling the fullscreen in the advanced menu).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Rami Santina
Administrator
I tested this long time ago when i was working on providing a stereo mode for my app (wanted to go FS then stereo)...
never got an exclusive FS. with AWT.

PS: Source code...etc is not owned by any individual, it owned by jogamp under jogamp's BSD licence.

Cheers,
Rami

On Thu, Jun 23, 2011 at 11:42 AM, gouessej [via jogamp] <[hidden email]> wrote:
Hi!

@Rami Santina
AWT has some sort of FSEM support in java.awt.GraphicsDevice.setFullScreenWindow(Window w):
http://download.oracle.com/javase/tutorial/extra/fullscreen/exclusivemode.html

Maximizing the window and making it undecorated is a kind of software simulated fullscreen mode which is used as a fallback solution when the real FSEM is not supported on a given platform.

An employee of Oracle who works on AWT confirmed me by email that it is a real bug and it is quite easy to fix.

@Sven Do you allow us to use your source code in AWT please? This bug drives GLCanvas unusable for fullscreen games on some machines (except by using ALT+F3 and enabling the fullscreen in the advanced menu).
If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/KDE-task-bar-is-always-on-top-of-fullscreen-Java-applications-tp3088594p3099079.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.

Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
Before 2002, it was not working at all on Linux. At the end of 2006, I was still using simulated software fullscreen mode. The Metacity (GNOME) bug was annoying... About 2 or 3 years ago, real FSEM worked on Linux but its implementation did not respect the NET VM specification, it is still the case now. I did not notice this problem until KDE became less permissive in its fourth version.

I'm an active user and an occasional contributer, that is why I have to ask the authorization to the JogAmp foundation in order to use a few lines of its source code in AWT both in Oracle Java and in OpenJDK. Maybe there is a problem of license :(
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Sven Gothel
Administrator
On Thursday, June 23, 2011 01:03:05 PM gouessej [via jogamp] wrote:

>
> Before 2002, it was not working at all on Linux. At the end of 2006, I was
> still using simulated software fullscreen mode. The Metacity (GNOME) bug was
> annoying... About 2 or 3 years ago, real FSEM worked on Linux but its
> implementation did not respect the NET VM specification, it is still the
> case now. I did not notice this problem until KDE became less permissive in
> its fourth version.
>
> I'm an active user and an occasional contributer, that is why I have to ask
> the authorization to the JogAmp foundation in order to use a few lines of
> its source code in AWT both in Oracle Java and in OpenJDK. Maybe there is a
> problem of license :(

Since Rami and I are the actual authors of NEWT's fullscreen feature,
as well as the 'New BSD license' allows you to reuse BSD code w/ a copyright/license remark / attribution,
you are allowed to to as you please under these terms.

Of course, you can just copy/paste the essential fullscreen mode settings
from 'NewtWindows_setFullscreen(..)' .. it's just pretty basic stuff
and no attribution has to be made here. You might still want to add a simple comment
about the origins to keep comparison later on more easy (optional).

If you guys find another bug .. pls post it.

Hope this helps, sorry for the late reply.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
Hi!

You do what you can, a late reply is better than nothing. The bug report with the patch is here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7057287
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Sven Gothel
Administrator
On Tuesday, June 28, 2011 12:30:17 PM gouessej [via jogamp] wrote:
>
> Hi!
>
> You do what you can, a late reply is better than nothing. The bug report
> with the patch is here:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7057287
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7057287 
>

looks good, thx a lot.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
You're welcome. I looked at several source code, yours was the only one that use the "above" property. Writing this patch was not difficult especially after someone on javagaming.org told me which file has to be modified. The KDE team was helpful too.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
In reply to this post by Sven Gothel
@Sven An Oracle engineer told me that we should not have to call XChangeProperty, XSendEvent should be enough, using XChangeProperty there is not conformant with the spec according ot him. Is it right?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

Sven Gothel
Administrator
On Wednesday, June 29, 2011 10:58:07 AM gouessej [via jogamp] wrote:
>
> @Sven An Oracle engineer told me that we should not have to call
> XChangeProperty, XSendEvent should be enough, using XChangeProperty there is
> not conformant with the spec according ot him. Is it right?
>

(1) All I have ready is that XChangeProperty changes the windows properties (local),
which can be tested w/ xprop.

(2) XSendEvent notifies the WM, which is the 'real deal' here, indeed.


See
  http://mailman.linuxchix.org/pipermail/techtalk/2003-May/015402.html
  http://standards.freedesktop.org/wm-spec/wm-spec-latest.html

I haven't seen that (1) is a violation of the spec though,
but I am not sure if those props are actually persistent w/ the window.
Hence I don't know for sure if (1) is redundant on all X11 systems,
so we kept it in the NEWT implementation.

You see, that after (1), we perform (2) in the NEWT code.

If you can verify that (1) is in violation and may even cause harm,
then let's correct the code by removing it's call.

Hope this helps a bit.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
I will use XSendEvent on mapped windows and XChangeProperty on unmapped windows, not the both. I will test on GNOME 2.32.1, GNOME 2.18, KDE 4.6.3 and KDE 3.5.4. java.net has some problems, JOGL 1.1.1a was not available for some hours and OpenJDK too, I will have to build Java later. Best regards.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: KDE task bar is always on top of fullscreen Java applications

gouessej
Administrator
Hi!

The fix does not work yet. As a first step, I tried to use almost exactly the same fix in AWT than in NEWT and it does not give me the expected result. There is no such line in NEWT, is it important?
event.xclient.display = awt_display;
Julien Gouesse | Personal blog | Website