[mythtv-users] is there a way to force mythfrontend to actually _obey_ -geometry?
Michael T. Dean
mtdean at thirdcontact.com
Thu Jan 5 19:16:29 UTC 2012
On 01/05/2012 10:40 AM, Ronald Frazier wrote:
> On Thu, Jan 5, 2012 at 5:31 AM, Mark Kendall wrote:
>>> Using the mythtv-frontend-0.24.1-20111019.0.1.mga1 and
>>> other packages supplied with Mageia 1 64-bit, I invoke
>>> mythfrontend with -geometry 640x360-0+0. The window
>>> comes up correctly, the right size and in the upper
>>> right-hand corner of the screen. However, a second or
>>> so later, it moves to the upper left-hand corner. Is
>>> there a -yes-actually-do-obey-geometry option or one
>>> to that effect?
>> Based upon your arguments, mythfrontend *should* be in the top left
>> corner. Arguments 3 and 4 (which should be +X+Y) are offsets from that
>> corner. The fact that it first appears in the top right will just be
>> something related to your window manager.
> Notice that he's NOT using +X+Y, but rather -X+Y. I think his thinking
> is that -0 would mean zero pixels from the right edge. A lot of
> window/gui systems use that sort of scheme. Whether or not myth does,
> I have no idea, but I imagine that's what he's thinking it does
Right. MythTV is not using Xlib code to handle -geometry, but is using
a hack that was never written to allow support for using negative to
index off the right/bottom. (It will accept negative offsets, but
ignores them.)
The reason we do this is because MythTV provides settings for location
and offset, so -geometry is actually just a -O override for those
settings. In other words, MythTV's providing support for specific
window sizing and placement (regardless of that performed by the Window
Manager) requires that we ignore the X-provided code.
The reason he sees it in the "proper" place first, then it snaps to the
MythTV-defined place, is because the initial window is created and
placed by the Window Manager, then MythTV requests that it be moved.
You can also see this if you do: mythfrontend -geometry 800x600 (don't
specify a location)... It will create the window and place it wherever
your Window Manager likes, then MythTV will request that it be moved to
the proper place. Note, also, that on some systems, you may have a race
condition where the "move" request doesn't actually occur at the right
time, so the window stays in the wrong place.
If someone really wants the negative offset support, they can write a
patch, but, alternatively, they could do a little math to get the
positive offsets or they could move the window manually.
Mike
More information about the mythtv-users
mailing list