Browser plugin and fullscreen

Is the browser plugin supposed to work in fullscreen mode? I’d like to allow users to switch between browser and fullscreen view. I tried this code:

import direct.directbase.DirectStart
from panda3d.core import WindowProperties

def toggleFullscreen():
  wp = WindowProperties()
  wp.setSize( 1024, 768 )
  wp.setFullscreen( not base.win.getProperties().getFullscreen() )
  base.win.requestProperties( wp )

base.accept( 'mouse1', toggleFullscreen )
run()

When I execute this code inside a browser (Ubuntu+Firefox in my case), the application switches to fullscreen mode, but I still see the browser interface. Is my code incorrect? Thank you!

It seems like that ought to work, and I know it does work correctly on Windows and OSX, though I admit I haven’t tried the fullscreen switch from the plugin on Linux. Does it work if you run it from the command line using the panda3d executable?

David

Actually, it appears that doesn’t work very well on Windows either. It’s probably better to destroy and re-create the window to switch between fullscreen and windowed mode, with code like this:

import direct.directbase.DirectStart
from panda3d.core import WindowProperties
import sys

def toggleFullscreen():
    wp = WindowProperties(base.win.getProperties())
    if wp.getFullscreen() and base.appRunner:
        # Return to the in-browser mode.
        wp = base.appRunner.windowProperties
    else:
        # Enter fullscreen mode.
        wp.setSize( 1024, 768 )
        wp.setFullscreen( not wp.getFullscreen() )
    
    base.openMainWindow(props = wp)

base.accept( 'mouse1', toggleFullscreen )
run()

David

Thank you for the answers! So, the observed behaviour is different than the expected one, then I signalled that.

As a side note: is it correct that if I sign the p3d file with an email certificate then it alerts the user saying that I’m using a self-signed certificate? Thank you!

Is it a self-signed email certificate? How did you generate the certificate?

If you generated the certificate yourself using, e.g., openssl, then it will be a self-signed certificate. But if you obtained the certificate from a third-party company, it ought to be officially signed. If it’s reporting it’s not, there might be a problem somewhere. Which company provided your email certificate?

David

It’s a Comodo certificate: I took it here. The runtime says it’s self-signed.

Are you using the 1.7.1 runtime, or are you on 1.7.0? I did have a problem with Comodo certificates, which I recently fixed. I’ll have to check to be sure whether my fix made it into 1.7.1 or not, though.

David

I’m using 1.7.1.