1

I have a Node Webkit application where I essentially do this:

toggleFullscreen: function(setFullscreen){
    if(setFullscreen){
        gui.Window.get().enterKioskMode();
        $("body").addClass("hd");
    } else if(!setFullscreen) {
        gui.Window.get().leaveKioskMode();
        $("body").removeClass("hd");
    }
}...

On Windows, the transition from the windowed view to Fullscreen works fine. On OSX however, the transition to and from kiosk mode also works, but when the transition is made, the window loses focus, and all keyboard key event handlers are detached.

Attempts to refocus the window using the Node Webkit API all appear to fail:

gui.Window.get().focus();

It appears to be a common issue- https://github.com/nwjs/nw.js/issues/1440 - and it doesn't look like a problem specific to Node-Webkit:

Has anyone else encountered the problem? I am, of course, very interested in a Node-Webkit work around, but would be interested in hearing about solutions in other languages.

Community
  • 1
  • 1
Charlie
  • 4,197
  • 5
  • 42
  • 59

0 Answers0