Resize window to 1:1 of newly opened video

Bug #903861 reported by Cody Garver
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Audience
Fix Released
Low
Tom Beckmann

Bug Description

Cody Garver (codygarver)
Changed in audience:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
mushroom3 (mushroom3) wrote :

as I thought, sink.get("window-height") or ("window-width") will just report the current size of the window the video is being drawn to, not of the media

mushroom3 (mushroom3)
Changed in audience:
importance: Medium → Low
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

You'll also have to get screen size and not make the window larger than the screen size.

Revision history for this message
Pim Vullers (pimvullers) wrote :

What about the following proposal:

if (video.height >= screen.height || video.width >= screen.width) {
  maximise()
} else {
  resize()
}

Another option is to limit by, lets say 90% of the available screen.

As far as I can see at this moment the only way to get the real available screen size is to actually maximise using the window.maximise call, then wait until the window manager actually resized the window (see http://osdir.com/ml/gnome.gtkmm/2004-01/msg00185.html), store that size and then resize again if needed. But I guess this won't look nice.

Revision history for this message
Tom Beckmann (tombeckmann) wrote :

I'm scaling it down to 90% (mazimizing would take you to fullscreen), but couldn't test it (no large videos). Would be nice if someone could have a look at it and if necessary reopen (or even fix!) the bug. :)

Changed in audience:
assignee: nobody → Tom Beckmann (tombeckmann)
status: Confirmed → Fix Committed
Cody Garver (codygarver)
Changed in audience:
status: Fix Committed → Confirmed
Cody Garver (codygarver)
Changed in audience:
status: Confirmed → Fix Committed
Cody Garver (codygarver)
Changed in audience:
milestone: none → 0.1
Changed in audience:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.