comparison gui/ui/main.c @ 35663:d1f84b219340

Don't unnecessarily and annoyingly move the video window. So far, this has been done at the start and end of a video (in non-fullscreen mode) as well as when selecting half, normal or double size of the video. Don't position the video window to the values given in the skin file, because the user might have moved it in the meantime, so just let it where it currently is. This closes Bugzilla #1355.
author ib
date Wed, 16 Jan 2013 19:38:44 +0000
parents a4741058bb40
children 96adc233474d
comparison
equal deleted inserted replaced
35662:782461b26312 35663:d1f84b219340
340 if ( guiApp.videoWindow.isFullScreen ) 340 if ( guiApp.videoWindow.isFullScreen )
341 { 341 {
342 uiFullScreen(); 342 uiFullScreen();
343 } 343 }
344 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 ); 344 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth / 2, guiInfo.VideoHeight / 2 );
345 wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
346 btnSet( evFullScreen,btnReleased ); 345 btnSet( evFullScreen,btnReleased );
347 } 346 }
348 break; 347 break;
349 case evDoubleSize: 348 case evDoubleSize:
350 if ( guiInfo.VideoWindow && guiInfo.Playing ) 349 if ( guiInfo.VideoWindow && guiInfo.Playing )
352 if ( guiApp.videoWindow.isFullScreen ) 351 if ( guiApp.videoWindow.isFullScreen )
353 { 352 {
354 uiFullScreen(); 353 uiFullScreen();
355 } 354 }
356 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 ); 355 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth * 2, guiInfo.VideoHeight * 2 );
357 wsMoveWindowWithin( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
358 btnSet( evFullScreen,btnReleased ); 356 btnSet( evFullScreen,btnReleased );
359 } 357 }
360 break; 358 break;
361 case evNormalSize: 359 case evNormalSize:
362 if ( guiInfo.VideoWindow && guiInfo.Playing ) 360 if ( guiInfo.VideoWindow && guiInfo.Playing )
364 if ( guiApp.videoWindow.isFullScreen ) 362 if ( guiApp.videoWindow.isFullScreen )
365 { 363 {
366 uiFullScreen(); 364 uiFullScreen();
367 } 365 }
368 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight ); 366 wsResizeWindow( &guiApp.videoWindow, guiInfo.VideoWidth, guiInfo.VideoHeight );
369 wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
370 btnSet( evFullScreen,btnReleased ); 367 btnSet( evFullScreen,btnReleased );
371 break; 368 break;
372 } else if ( !guiApp.videoWindow.isFullScreen ) break; 369 } else if ( !guiApp.videoWindow.isFullScreen ) break;
373 case evFullScreen: 370 case evFullScreen:
374 if ( guiInfo.VideoWindow && ( guiInfo.Playing || !iparam ) ) 371 if ( guiInfo.VideoWindow && ( guiInfo.Playing || !iparam ) )
375 { 372 {
376 uiFullScreen(); 373 uiFullScreen();
377 if ( !guiApp.videoWindow.isFullScreen ) 374 if ( !guiApp.videoWindow.isFullScreen )
378 {
379 wsResizeWindow( &guiApp.videoWindow, iparam ? guiInfo.VideoWidth : guiApp.video.width, iparam ? guiInfo.VideoHeight : guiApp.video.height ); 375 wsResizeWindow( &guiApp.videoWindow, iparam ? guiInfo.VideoWidth : guiApp.video.width, iparam ? guiInfo.VideoHeight : guiApp.video.height );
380 wsMoveWindow( &guiApp.videoWindow, False, guiApp.video.x, guiApp.video.y );
381 }
382 } 376 }
383 if ( guiApp.videoWindow.isFullScreen ) btnSet( evFullScreen,btnPressed ); 377 if ( guiApp.videoWindow.isFullScreen ) btnSet( evFullScreen,btnPressed );
384 else btnSet( evFullScreen,btnReleased ); 378 else btnSet( evFullScreen,btnReleased );
385 break; 379 break;
386 380