x11: remove gravity restore code

It was added with 3813c685 in 2004. I'm not really sure why this gravity
stuff would be needed; apparently it has to do with misplacements with
broken WMs and had to be changed on fullscreen. Just get rid of it; it
works perfectly fine without on modern WMs.

The thread discussing this is here:
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027674.html
This commit is contained in:
wm4 2014-05-17 00:51:02 +02:00
parent 9546274710
commit c14721c8b9
2 changed files with 0 additions and 10 deletions

View File

@ -346,7 +346,6 @@ int vo_x11_init(struct vo *vo)
.olddecor = MWM_DECOR_ALL,
.oldfuncs = MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE |
MWM_FUNC_MAXIMIZE | MWM_FUNC_RESIZE,
.old_gravity = NorthWestGravity,
};
vo->x11 = x11;
@ -840,8 +839,6 @@ int vo_x11_check_events(struct vo *vo)
x11->window_hidden = false;
vo_x11_clearwindow(vo, x11->window);
vo_x11_update_geometry(vo);
x11->vo_hint.win_gravity = x11->old_gravity;
XSetWMNormalHints(display, x11->window, &x11->vo_hint);
break;
case DestroyNotify:
MP_WARN(x11, "Our window was destroyed, exiting\n");
@ -1468,12 +1465,6 @@ static void vo_x11_fullscreen(struct vo *vo)
vo_x11_ewmh_fullscreen(x11, _NET_WM_STATE_ADD);
}
XGetWMNormalHints(x11->display, x11->window, &x11->vo_hint, &(long){0});
if (!(x11->vo_hint.flags & PWinGravity))
x11->old_gravity = NorthWestGravity;
else
x11->old_gravity = x11->vo_hint.win_gravity;
if (!(x11->wm_type & vo_wm_FULLSCREEN)) { // not needed with EWMH fs
vo_x11_decoration(vo, opts->border && !x11->fs);
vo_x11_sizehint(vo, x, y, w, h, true);

View File

@ -62,7 +62,6 @@ struct vo_x11_state {
XSizeHints vo_hint;
bool mouse_cursor_hidden;
int orig_layer;
int old_gravity;
// Current actual window position (updated on window move/resize events).
int win_x;