Ticket #278: fixforblackbox070.diff

File fixforblackbox070.diff, 2.6 KB (added by pdbogen@…, 22 years ago)

Proposed fix

  • libvo/x11_common.c

    diff -Nru a/libvo/x11_common.c b/libvo/x11_common.c
    a b  
    14401440        {
    14411441            if (vo_dwidth != vo_screenwidth && vo_dheight != vo_screenheight)
    14421442                return;
    1443             x = vo_old_x;
    1444             y = vo_old_y;
    1445             w = vo_old_width;
    1446             h = vo_old_height;
    1447         }
     1443                }
    14481444
     1445                // Since the size IS hinted for EWMH, now, we need to restore the proper size.
     1446        x = vo_old_x;
     1447        y = vo_old_y;
     1448        w = vo_old_width;
     1449        h = vo_old_height;
     1450        vo_x11_sizehint(x, y, w, h, 0);
    14491451        vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE);   // removes fullscreen state if wm supports EWMH
    14501452        vo_fs = VO_FALSE;
    14511453    } else
    14521454    {
    14531455        // win->fs
    1454         vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD);      // sends fullscreen state to be added if wm supports EWMH
    1455 
    1456         vo_fs = VO_TRUE;
     1456                // There's a small problems with EWMH and keepaspect: Blackbox 0.70.0 tries to obey both the aspect
     1457                // and the fullscreen request, resulting in a loss of about 1/5th of the bottom of the mplayer
     1458                // window. This is fixed by sizehinting the window to the screen size.
    14571459        if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // not needed with EWMH fs
    14581460        {
    14591461            if (vo_old_width &&
    14601462                (vo_dwidth == vo_screenwidth && vo_dwidth != vo_old_width) &&
    1461                 (vo_dheight == vo_screenheight && vo_dheight != vo_old_height))
     1463                (vo_dheight == vo_screenheight && vo_dheight != vo_old_height)) {
     1464                vo_fs = VO_TRUE;
    14621465                return;
    1463             vo_old_x = vo_dx;
    1464             vo_old_y = vo_dy;
    1465             vo_old_width = vo_dwidth;
    1466             vo_old_height = vo_dheight;
    1467             x = 0;
    1468             y = 0;
    1469             w = vo_screenwidth;
    1470             h = vo_screenheight;
     1466            }
    14711467        }
     1468        vo_old_x = vo_dx;
     1469        vo_old_y = vo_dy;
     1470        vo_old_width = vo_dwidth;
     1471        vo_old_height = vo_dheight;
     1472        x = 0;
     1473        y = 0;
     1474        w = vo_screenwidth;
     1475        h = vo_screenheight;
     1476        vo_x11_sizehint( x, y, w, h, 0);
     1477        vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD);      // sends fullscreen state to be added if wm supports EWMH
     1478
     1479        vo_fs = VO_TRUE;
    14721480    }
    14731481    {
    14741482        long dummy;
    … …  
    14891497    if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // not needed with EWMH fs
    14901498    {
    14911499        vo_x11_decoration(mDisplay, vo_window, (vo_fs) ? 0 : 1);
    1492         vo_x11_sizehint(x, y, w, h, 0);
     1500//      vo_x11_sizehint(x, y, w, h, 0);
    14931501        vo_x11_setlayer(mDisplay, vo_window, vo_fs);
    14941502
    14951503