Windows+GTK: browser not visible in a borderless window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Windows+GTK: browser not visible in a borderless window

Postby Peter » Mon Feb 08, 2021 11:21 am

And the mouse pointer still changes according to the invisible controls on the displayed webpage.

Of course this must be not CEF's but GTK's fault in some way, I am just asking for advice for where to look to maybe fix this.

Also, not sure if related - OSR windows in the CefClient example seem to behave in exactly the same way - mouse pointer changes, but the window is blank.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Re: Windows+GTK: browser not visible in a borderless window

Postby magreenblatt » Mon Feb 08, 2021 12:03 pm

What OS and CEF version? Are you running in a VM or remote desktop?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windows+GTK: browser not visible in a borderless window

Postby Peter » Tue Feb 09, 2021 4:53 am

magreenblatt wrote:Are you running in a VM or remote desktop?


That's right! Indeed I work via RDP on Windows - will try testing if it works the normal way...

But can I do something to ensure that the window shows up on the remote desktop? It only happens with GTK, the normal WINAPI version works as expected.
I'd be fine with showing it as a bitmap copied somehow from an off-screen window, just haven't figured up how to do this...

Also I'm running a Linux VM for the same project - but everything works fine there.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Re: Windows+GTK: browser not visible in a borderless window

Postby magreenblatt » Tue Feb 09, 2021 10:07 am

The RDP display issue could be https://bitbucket.org/chromiumembedded/cef/issues/2947 if you’re using off-screen rendering. I have not tried GTK on Windows so I can’t help there.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windows+GTK: browser not visible in a borderless window

Postby Peter » Tue Feb 09, 2021 11:03 am

Thanks! I'll be happy with any quick & dirty fix here, since this particular window is not very important.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Re: Windows+GTK: browser not visible in a borderless window

Postby Peter » Wed Feb 10, 2021 10:33 am

Meanwhile, I checked my CefClient 3112 without RDP, and the OSR window is still blank... But this OpenGL stuff might not be related to my GTK problem anyway - so I found this topic "Can I get a bitmap of the full page?" that says there is a way to get the currently visible portion of the webpage in the viewport as a bitmap(?) - does this still work? Would this work if the browser window is not visible? I don't see anything like "CefBrowser::GetImage" anywhere near my (old 3112) or the current version.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Re: Windows+GTK: browser not visible in a borderless window

Postby magreenblatt » Wed Feb 10, 2021 12:23 pm

I suggest you start by verifying that the GTK app works on a normal Windows machine. The problem may be unrelated to RDP.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windows+GTK: browser not visible in a borderless window

Postby Peter » Thu Feb 11, 2021 3:41 am

magreenblatt wrote:I suggest you start by verifying that the GTK app works on a normal Windows machine. The problem may be unrelated to RDP.


That's what I tried to say, yes - I checked both the normal CEF client and my GTK-based client on a local Windows machine, with the same result as on RDP. What I don't get is that when I tried the OSR-mode, it showed blank window for me even on the local machine.

Apparently GTK uses some sort of weird trick(s) for painting borderless windows on Windows, and it interferes with CEF's way of rendering browser windows - they are created as child windows, and if I remember correctly, the whole idea of GTK is that it does not allow any child windows to overlap... that's why I was hoping to copy an off-screen rendered bitmap to a GTK-pixbuf or something, but somehow I can't even see that the OSR mode is working.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Re: Windows+GTK: browser not visible in a borderless window

Postby magreenblatt » Thu Feb 11, 2021 11:07 am

What I don't get is that when I tried the OSR-mode, it showed blank window for me even on the local machine.

Was this with “cefclient --off-screen-rendering-enabled”? What Windows version are you using? Is it also a problem with current CEF versions (you can download and test the “Sample Application”)?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Windows+GTK: browser not visible in a borderless window

Postby Peter » Fri Feb 12, 2021 12:02 pm

magreenblatt wrote:Was this with “cefclient --off-screen-rendering-enabled”? What Windows version are you using?

Yes.
Tested on Windows 10 (real) and Windows 7 (VirtualBox VM)

Is it also a problem with current CEF versions (you can download and test the “Sample Application”)?


Same result with the version 4324: `cefclient --off-screen-rendering-enabled` showing blank window, but the mouse pointer seems to respond to the invisible window content.

...update: finally, I've been able to find another Windows-10 machine, where OSR mode works, so there might have been some OpenGL-specific issues with my hardware :| Still, I am quite interested in intercepting the browser window content & copying it as a bitmap, could you give any advice on that?
Last edited by Peter on Fri Feb 12, 2021 12:35 pm, edited 1 time in total.
Peter
Techie
 
Posts: 38
Joined: Thu Mar 05, 2020 9:41 am

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 98 guests