Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Tk geometry unexpected return if window withdrawn and re-instated

by beech (Parson)
on Aug 03, 2019 at 03:12 UTC ( [id://11103789]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tk geometry unexpected return if window withdrawn and re-instated
in thread Tk geometry unexpected return if window withdrawn and re-instated

Hi

If I may, what flavor of Unix and Desktop interface are you using, as it appears from the results you are not encountering the geometry issue I am?

I'm using windows :) old osname=MSWin32, osvers=6.0, Tk 804.033

What do you get from  $mw->winfo('geometry')?

  • Comment on Re^3: Tk geometry unexpected return if window withdrawn and re-instated
  • Download Code

Replies are listed 'Best First'.
Re^4: Tk geometry unexpected return if window withdrawn and re-instated
by WayneRas (Acolyte) on Aug 03, 2019 at 08:01 UTC

    What do you get from $mw->winfo('geometry') ?
    With the code as posted replacing $mw->geometry with no parameters with $mw->winfo('geometry') and requesting $mw->geometry('+10+0') I got:
    init geometry=497x32+10+57,rootx=10,rooty=57;height:32.00
    exit geometry=497x32+10+57,rootx=10,rooty=57;height:32.00
    I have no doubt the nudge(+57) it got relates to the Ubuntu task bar at top of screen.
    I changed the requested geometry to '+100+150' to ensure well away from the edges/bars and got:
    init geometry=497x32+100+180,rootx=100,rooty=180;height:32.00
    exit geometry=497x32+100+180,rootx=100,rooty=180;height:32.00
    In this case the nudge is '+30'.
    The problem of course being/remaining is saving the window coordinates as returned via either $mw->geometry or $mw->winfo('geometry') and attempting to reuse them at start of the next app run means the window will basically be offset and this would be cumulative unless some adjustment made on my part - but that adjustment is unlikely to be one size fits all.
    Again thanks for your time and efforts. I however, believe the return on effort for providing that ability in my case is not worth it and the user will just have to move the window themselves each session - FYI undecorated windows, while not having this problem, have another which is if the user moves the window to cover the system task bar (which they cannot do with a decorated one), they cannot move it back if there is nothing to 'grab' i.e. the window fits within the task bar (so I don't let that happen).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11103789]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found