[MPlayer-dev-eng] [PATCH] libvo/x11_common: resize window before mapping it.
Nicolas George
nicolas.george at normalesup.org
Wed Feb 6 19:22:23 CET 2013
L'octidi 18 pluviôse, an CCXXI, Reimar Döffinger a écrit :
> I am working from memory, but I think this has several issues
> 1) quite a few window managers decide on the position and size upon map,
> which means that this change will lead to the values specified via
> -geometry being ignored
I confirm. I had not tested that before, but indeed the coordinates for the
geometry are ignored.
> 2) since we try to set size/position before enabling the corresponding
> event masks, we will not get the proper notifications. This can lead
> to vo_dx/dy/dwidth/dheight being out of sync with the real window size.
> This is possibly even more true since vo_x11_update_geometry uses
> XGetGeometry etc. to try to figure out the position, which is a strange
> thing to do for an unmapped window I think.
I see the problem.
> 3) What window placement decision? As far as I can tell MPlayer
> calls XMoveResizeWindow always, so there isn't supposed to be anything
> for the window manager to decide...
There is the matter of the initial placement of the window: if the user did
not specify -geometry, the WM is supposed to ignore the parameters given to
XCreateWindow and select a good position. Mine does, but according to the
320×200 dummy size, and the effect is ruined by the immediate resize: at
best, the resized window will overlap with an existing window, while there
was room not to elsewhere on the screen, at worst it will overflow the
screen.
I will try to implement a better fix.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130206/93028bed/attachment.asc>
More information about the MPlayer-dev-eng
mailing list