Page 1 of 1

revBrowser and fullScreen

Posted: Mon Dec 14, 2009 6:17 am
by sturgis
Got a quick question. I'm using revBrowser to display varying pages. Everything is working great, except when I need to switch into and out of fullscreen mode.
Unfortunately, going to fullscreen seems to break the browser. Everything goes white, non-clickable. Switching back from fullscreen leaves the browser in the same state. I've tried revBrowswerRedraw to solve the issue, as well as revBrowserRefresh and neither solve the problem. The only way i've found to get it working again is kill the instance and insert a new revBrowser instance.
Obviously this won't work when playing a web based video. I would use qt to do the video playing, but in this case its not an option. Suggestions?

Re: revBrowser and fullScreen

Posted: Mon Dec 14, 2009 11:11 am
by ale870
Hello,

try to use this workaround: use the command ScreenRect to get screen size, then resize the stack to that size, then elimnate decorators. Final appearance is like a full-screen system.

Cheers!

Re: revBrowser and fullScreen

Posted: Mon Dec 14, 2009 3:31 pm
by sturgis
K. Will do it that way.

Thanks!

Re: revBrowser and fullScreen

Posted: Mon Dec 14, 2009 5:16 pm
by sturgis
Strangely enough, removing the decorations seems to kill revBrowser also.

Here is what i have so far. Calling killDeco from the message box makes the browser object go poof, tho the instance is still there and appears functional other than the minor problem of its invisibility.

Code: Select all

global tBrowserId
on openStack
   put revBrowserOpen(the windowId of this stack, "http://www.google.com") into tBrowserId
   if tBrowserId is not an integer then
      answer "Failed to open browser"
   else
      setBrowser
   end if
end openStack

on resizeStack
   setBrowser
end resizeStack

on setBrowser
   lock screen
   put the rect of this card into tRect
   set the rect of graphic "backGroundRect" to tRect
   add 15 to item 2 of tRect
   subtract 15 from item 4 of tRect
   set the rect of graphic "browserRect" to tRect
   revBrowserSet tBrowserId,"rect",the rect of graphic "browserRect"
   unlock screen
end setBrowser

on killDeco
   if the decorations of this stack is empty then
      set the decorations of this stack to "default"
      setBrowser
   else
      set the decorations of this stack to empty
      setBrowser
   end if
end killDeco

Re: revBrowser and fullScreen

Posted: Mon Dec 14, 2009 5:42 pm
by ale870
Simply try to work with stack:

Code: Select all

set the rect of this stack to the screenRect 
Eliminate onResize event, and resize the browser "by hand" with the resize functions directly, using a send command with a small delay:

Code: Select all

send "setBrowser" to me in 1 milliseconds
It will allow suspended task activities to be performed.

Re: revBrowser and fullScreen

Posted: Mon Dec 14, 2009 5:52 pm
by sturgis
Oh well, I have a solution that should work, will implement it in a bit. It seems that removing the decorations from the window after the instantiating the browser object toasts.. something. I wonder if its a layer issue, or.. don't know. So I will put it together with my own icons and decorations entirely at which point the problem goes away and I can use your work around for sizing and avoid using fullscreen too.

The same thing occurs in the browser sampler, if you remove the decorations from the provided browser stack the browser object ceases to be visible. It seems that anything that requires a window reset makes it go hinky.