OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

How to position osg Window on top or below other X11 apps on Linux


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Wed Jun 04, 2014 6:58 pm    Post subject:
How to position osg Window on top or below other X11 apps on Linux
Reply with quote

Hi everyone,

I am trying to find the best method to be able to control our osg windows such that we can force them on top of other KDE/X11 apps or push them below other KDE/X11 apps as necessary while our osg based application is running.

Looking at osg::GraphicsContext::Traits, seems just about everything is in
there except an option to do this...

The 64bit Linux system is running a KDE desktop for the window manager.

Any hints or suggestions would be greatly appreciated.

...

Thank you!

Cheers,
Curtis
Back to top
View user's profile Send private message
mkliko
Newbie


Joined: 19 May 2014
Posts: 16

PostPosted: Thu Jun 05, 2014 8:14 am    Post subject:
Re: How to position osg Window on top or below other X11 apps on Linux
Reply with quote

wrote:
Hi everyone,

I am trying to find the best method to be able to control our osg windows such that we can force them on top of other KDE/X11 apps or push them below other KDE/X11 apps as necessary while our osg based application is running.

Looking at osg::GraphicsContext::Traits, seems just about everything is in
there except an option to do this...

The 64bit Linux system is running a KDE desktop for the window manager.

Any hints or suggestions would be greatly appreciated.

...

Thank you!

Cheers,
Curtis


Hi Curtis,

I'm not sure how to do this under Linux. I know that in windows you can get a window-handle from osg for the viewer that's created.

I'm not sure if this is also possible under Linux, but I can't imagine why it isn't possible under Linux.
Maybe you can try my code to see if it works.

An example of my code where I get a window handle can be found here:
http://forum.openscenegraph.org/viewtopic.php?t=13866

Maybe it helps...

Good luck!

Marco
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Thu Jun 05, 2014 11:46 am    Post subject:
Reply with quote

Hi Marco,

Thank you for your reply...

Actually I have already been talking with Trajce Nikolov(Nick)
about this yesterday as he does some consulting work for
us from time to time. He has helped us a lot and I highly
recommend him for his expertise...

Unfortunately, that window handle method does not seem to
be available under Linux so we are searching for a method
that will work under Linux. After spending some time online
trying to find some info on this, seems there are some posts
asking similar things around, but I did not find anyone that
had a good working result. Seems that with the variety of
window managers out there, they all apparently have different
ways of handling this type of thing.

I was able to go into my KDE desktop settings and using the
application name setup the kwinrulesrc file to force one of my
osg window ontop of any others. So I know there is a way
to accomplish what we need, just need to find the API to
accomplish this in my code now. Something we can turn
on/off as necessary for various osg windows as they open
and close.

...

Thank you again for your reply..

Cheers,
Curtis
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Jun 05, 2014 12:30 pm    Post subject:
How to position osg Window on top or below other X11 apps on Linux
Reply with quote

Hi Curtis,

thanks for the refferal Smile.


Quote:
 Unfortunately, that window handle method does not seem to
be available under Linux...

I looked in the headers and in osgViewer/api/X11 I see the class as GraphicsHandleX11 but don't know how it is hooked up internally (not a Linux developer as you know). I hope the others from the community will point you to the right direction. Maybe our Linux guru Robert will write a line on this Smile


Cheers,
Nick



On Thu, Jun 5, 2014 at 1:46 PM, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Marco,

Thank you for your reply...

Actually I have already been talking with Trajce Nikolov(Nick)
about this yesterday as he does some consulting work for
us from time to time.  He has helped us a lot and I highly
recommend him for his expertise...

Unfortunately, that window handle method does not seem to
be available under Linux so we are searching for a method
that will work under Linux.  After spending some time online
trying to find some info on this, seems there are some posts
asking similar things around, but I did not find anyone that
had a good working result.  Seems that with the variety of
window managers out there, they all apparently have different
ways of handling this type of thing.

I was able to go into my KDE desktop settings and using the
application name setup the  kwinrulesrc file to force one of my
osg window ontop of any others.  So I know there is a way
to accomplish what we need, just need to find the API to
accomplish this in my code now.  Something we can turn
on/off as necessary for various osg windows as they open
and close.

...

Thank you again for your reply..

Cheers,
Curtis

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=59643#59643





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Thu Jun 05, 2014 12:38 pm    Post subject:
Reply with quote

Nick,

The strange thing is that KDE is a Qt based desktop, even when I use
a QT based application window I cannot force it to be ontop of other applications
either. If there are multiple Widgets in one application the Qt ontop stuff works, but
when the widgets are from separate apps it does not.

I understand that there are issues when everyone wants to be ONTOP of someone
else, someone is going to loose...so the desktop manager ends up doing something
for this.

Not sure if in our case this is a KDE4 API issue or an X11 issue or some combination
of both that we need to address.

...

Thank you!

Cheers,
Curtis
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Jun 05, 2014 12:39 pm    Post subject:
How to position osg Window on top or below other X11 apps on Linux
Reply with quote

Hi Curtis,

there is a method raiseWindow() in GraphicsWindowX11. Can you give it a shot?


Nick



On Thu, Jun 5, 2014 at 2:38 PM, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Nick,

The strange thing is that KDE is a Qt based desktop, even when I use
a QT based application window I cannot force it to be ontop of other applications
either.  If there are multiple Widgets in one application the Qt ontop stuff works, but
when the widgets are from separate apps it does not.

I understand that there are issues when everyone wants to be ONTOP of someone
else, someone is going to loose...so the desktop manager ends up doing something
for this.

Not sure if in our case this is a KDE4 API issue or an X11 issue or some combination
of both that we need to address.

...

Thank you!

Cheers,
Curtis

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=59646#59646





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Trajce Nikolov NICK
Guest





PostPosted: Thu Jun 05, 2014 1:23 pm    Post subject:
How to position osg Window on top or below other X11 apps on Linux
Reply with quote

Curtis, have a look at src/osgViewer/GraphicsWindowX11.cpp raiseWindow() method. The author ( I guess Don Burns ) is using the Display instead of some window handle as in Windows, and is setting attributes there. So maybe you get inspiration from there

Nick



On Thu, Jun 5, 2014 at 2:38 PM, Trajce Nikolov NICK < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Curtis,

there is a method raiseWindow() in GraphicsWindowX11. Can you give it a shot?


Nick



On Thu, Jun 5, 2014 at 2:38 PM, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Nick,

The strange thing is that KDE is a Qt based desktop, even when I use
a QT based application window I cannot force it to be ontop of other applications
either.  If there are multiple Widgets in one application the Qt ontop stuff works, but
when the widgets are from separate apps it does not.

I understand that there are issues when everyone wants to be ONTOP of someone
else, someone is going to loose...so the desktop manager ends up doing something
for this.

Not sure if in our case this is a KDE4 API issue or an X11 issue or some combination
of both that we need to address.

...

Thank you!

Cheers,
Curtis

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=59646#59646





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org








--
trajce nikolov nick





--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Thu Jun 05, 2014 1:33 pm    Post subject:
Reply with quote

Nick,

I am looking at it now to see if I can
figure out the API and make the calls correctly.

...

Thank you!

Curtis
Back to top
View user's profile Send private message
crubel@compro.net
User


Joined: 12 Aug 2010
Posts: 75
Location: Melbourne, FL USA

PostPosted: Thu Jun 05, 2014 1:42 pm    Post subject:
raiseWindow() but no oppisite call to reverse this?
Reply with quote

NIck,

I do not have this working yet but:
what about a lowerWindow()..meothd .how do you
reset this once you set it? raiseWindow takes
no args so I do not see a method to return the window
back to the previous state once its raised.

I guess if you raise another window after this one
it pushes this one back down possibly??

..

Thank you!

Curtis
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Thu Jun 05, 2014 4:31 pm    Post subject:
How to position osg Window on top or below other X11 apps on Linux
Reply with quote

I google this lowerWindow and it seam XLib has it

http://tronche.com/gui/x/xlib/window/XLowerWindow.html



About reseting to the original position from the code maybe XReparentWindow, but this is only a guess


Nick



On Thu, Jun 5, 2014 at 3:42 PM, Curtis Rubel < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
NIck,

I do not have this working yet but:
what about a lowerWindow()..meothd .how do you
reset this once you set it?  raiseWindow takes
no args so I do not see a method to return the window
back to the previous state once its raised.

I guess if you raise another window  after this one
it pushes this one back down possibly??

..

Thank you!

Curtis

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=59650#59650





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osgText::Text dissapears when reparen... dhhabyc General 0 Wed Mar 27, 2019 1:48 pm View latest post
No new posts How do I continuously read the mouse ... kornerr General 9 Wed Feb 06, 2019 2:02 pm View latest post
No new posts osgprerender and render to Window Trajce Nikolov NICK General 0 Mon Feb 04, 2019 2:52 pm View latest post
No new posts setViewMatrixAsLookAt not working to ... Rodrigo General 4 Tue Jan 08, 2019 2:48 am View latest post
No new posts osg apps on gpu cluster Trajce Nikolov NICK General 7 Mon Oct 01, 2018 6:43 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP