Prevent window showing on top CEF

Built a cool app using CEF that you'd like to share with the community? Talk about it here.

Prevent window showing on top CEF

Postby fr3nzy » Fri Sep 15, 2017 6:49 am

I have created two borderless browser windows (CEF 3.3112.1659 on Ubuntu 12.04.5 x64) which may overlap (this is configurable and unknown at compile time, as it's loaded after process startup). Windows are created as described in my other thread (http://www.magpcss.org/ceforum/viewtopic.php?f=11&t=15434).

Currently if two overlapping windows (A and B) are created and A is in front of B, when B is clicked it retrieves focus and is displayed in front of A. My desired logic would be when A is in front of B, B gets clicked and gets focus but it is not displayed in front of A. In other words I want to retain z/stack order of each window.

Until now i have unsucessfully tried finding flags to set property with x11. Is this even possible, if so, how?

Preferably with x11 (without window manager) or in CEF (if it is possible to handle with unknown handler) so it may be used in Windows.

Note:
- i can only use prebuild binaries (i cannot rebuild the entire cef),
- i'm stuck with the EOF ubuntu version.
Last edited by fr3nzy on Tue Sep 19, 2017 1:46 am, edited 1 time in total.
fr3nzy
Techie
 
Posts: 10
Joined: Tue Sep 12, 2017 5:47 am

Re: Prevent window showing on top CEF

Postby magreenblatt » Fri Sep 15, 2017 2:43 pm

It generally depends on the window manager. See https://stackoverflow.com/questions/434 ... ays-on-top
magreenblatt
Site Admin
 
Posts: 7965
Joined: Fri May 29, 2009 6:57 pm

Re: Prevent window showing on top CEF

Postby fr3nzy » Fri Oct 27, 2017 4:50 am

Unfortunately I still haven't solved the issue.

I adapted the CEF application that it runs in Ubuntu 16.04.3 x64 server with XOrg (no window manager).
I create two windows which overlap and when i click the one in the background it goes to the front.

If i for instance create two overlapping JFrame windows on the same VM and click the one in the background, teh window stays in the background.

Due to no window manager, bringing to top is handled by CEF.

So current question is, is this true, and if it is, how can i disable this?
fr3nzy
Techie
 
Posts: 10
Joined: Tue Sep 12, 2017 5:47 am

Re: Prevent window showing on top CEF

Postby fr3nzy » Mon Nov 06, 2017 9:24 am

Problem was solved with setting SetFocusable(false) on problematic (the one which shouldn't jump to front) window.

Note: This also prevents actual keyboard.
fr3nzy
Techie
 
Posts: 10
Joined: Tue Sep 12, 2017 5:47 am


Return to Apps Discussion

Who is online

Users browsing this forum: No registered users and 1 guest