revBrowser and fullScreen

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

revBrowser and fullScreen

Post by sturgis » Mon Dec 14, 2009 6:17 am

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?

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: revBrowser and fullScreen

Post by ale870 » Mon Dec 14, 2009 11:11 am

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!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: revBrowser and fullScreen

Post by sturgis » Mon Dec 14, 2009 3:31 pm

K. Will do it that way.

Thanks!

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: revBrowser and fullScreen

Post by sturgis » Mon Dec 14, 2009 5:16 pm

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

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: revBrowser and fullScreen

Post by ale870 » Mon Dec 14, 2009 5:42 pm

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.
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: revBrowser and fullScreen

Post by sturgis » Mon Dec 14, 2009 5:52 pm

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.

Post Reply