• odd windowing issue (perl Tk)

    From Mike Scott@3:633/10 to All on Wed Jul 8 12:03:51 2026
    Hi all. A bit of an odd problem here.

    I've a perl program that opens an X window using Tk. I specify the
    geometry 1400x700+0+0.

    Running under Mint, it works fine, and opens exactly as expected in the
    top left screen corner.

    On the Pi (pi4, 11/bullseye), it opens a window with the correct size
    but a very odd position:

    xwininfo: Window id: 0x1a00013 "Display"

    Absolute upper-left X: 1782
    Absolute upper-left Y: 30
    Relative upper-left X: 2
    Relative upper-left Y: 30
    Width: 1400
    Height: 700
    Depth: 24
    Visual: 0x21
    Visual Class: TrueColor
    Border width: 0
    Class: InputOutput
    Colormap: 0x20 (not installed)
    Bit Gravity State: NorthWestGravity
    Window Gravity State: NorthWestGravity
    Backing Store State: NotUseful
    Save Under State: no
    Map State: IsViewable
    Override Redirect State: no
    Corners: +1782+30 --1262+30 --1262-350 +1782-350
    -geometry 1400x700+1780+0

    which is well off to the right, with the title bar concealed underneath
    the top task bar.

    Any thoughts please as to what might be going on?


    (I know bulldog isn't the latest but I don't have any pressing need to upgrade. This machine is dedicated to running this one program.

    I also see xrandr returns unexpected output about not being able to
    fetch the gamma value for the screen, which it calls "default". But
    maybe that's a red herring.)



    --
    Mike Scott
    Harlow, England


    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Riches@3:633/10 to All on Wed Jul 8 17:04:01 2026
    On 2026-07-08, Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
    Hi all. A bit of an odd problem here.

    I've a perl program that opens an X window using Tk. I specify the
    geometry 1400x700+0+0.

    Running under Mint, it works fine, and opens exactly as expected in the
    top left screen corner.

    On the Pi (pi4, 11/bullseye), it opens a window with the correct size
    but a very odd position:

    xwininfo: Window id: 0x1a00013 "Display"

    Absolute upper-left X: 1782
    Absolute upper-left Y: 30
    Relative upper-left X: 2
    Relative upper-left Y: 30
    Width: 1400
    Height: 700
    Depth: 24
    Visual: 0x21
    Visual Class: TrueColor
    Border width: 0
    Class: InputOutput
    Colormap: 0x20 (not installed)
    Bit Gravity State: NorthWestGravity
    Window Gravity State: NorthWestGravity
    Backing Store State: NotUseful
    Save Under State: no
    Map State: IsViewable
    Override Redirect State: no
    Corners: +1782+30 --1262+30 --1262-350 +1782-350
    -geometry 1400x700+1780+0

    which is well off to the right, with the title bar concealed underneath
    the top task bar.

    Any thoughts please as to what might be going on?


    (I know bulldog isn't the latest but I don't have any pressing need to upgrade. This machine is dedicated to running this one program.

    I also see xrandr returns unexpected output about not being able to
    fetch the gamma value for the screen, which it calls "default". But
    maybe that's a red herring.)

    Under some circumstances, the window manager can override the
    size or position parameters. Under some other circumstances, the
    application can ignore those parameters.

    There is a program called devilspie (apparently named after a
    song) that can force new (or old) windows to specified sizes and
    positions.

    --
    Robert Riches
    spamtrap42@jacob21819.net
    (Yes, that is one of my email addresses.)

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Mike Scott@3:633/10 to All on Wed Jul 8 19:54:56 2026
    On 08/07/2026 18:33, rbowman wrote:
    On Wed, 8 Jul 2026 12:03:51 +0100, Mike Scott wrote:

    (I know bulldog isn't the latest but I don't have any pressing need to
    upgrade. This machine is dedicated to running this one program.

    What is XDG_SESSION_TYPE? Mint is X11. I'm running the latest Trixie derivative on the Pi and it is Wayland. I'm wondering if an older XWayland isn't doing the job.

    Thanks for the comment.

    X11 (on both)


    --
    Mike Scott
    Harlow, England

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Mike Scott@3:633/10 to All on Wed Jul 8 19:57:06 2026
    On 08/07/2026 18:04, Robert Riches wrote:
    Under some circumstances, the window manager can override the
    size or position parameters. Under some other circumstances, the
    application can ignore those parameters.

    Presumably the wm's differ. But /anything/ positioning a window outside
    the screen real estate after ignoring the user's request is most
    assuredly broken.

    Looks like I'll have to write some simpler test code to see what's
    happening.

    Thanks for the thought.

    --
    Mike Scott
    Harlow, England

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Thu Jul 9 10:30:01 2026
    On Wed, 8 Jul 2026 12:03:51 +0100, Mike Scott wrote:

    On the Pi (pi4, 11/bullseye), it opens a window with the correct
    size but a very odd position:

    On Wayland, the application is not in control of where its windows
    appear.

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Robert Riches@3:633/10 to All on Thu Jul 9 02:46:39 2026
    On 2026-07-08, Lawrence D?Oliveiro <ldo@nz.invalid> wrote:
    On Wed, 8 Jul 2026 12:03:51 +0100, Mike Scott wrote:

    On the Pi (pi4, 11/bullseye), it opens a window with the correct
    size but a very odd position:

    On Wayland, the application is not in control of where its windows
    appear.

    Then, what of the time-honored -geometry or --geometry option a
    user can add to a command line in a script or alias to create a
    window at a user-specified location? I have scripts that open
    multiple windows, each at a location specified by that option.

    --
    Robert Riches
    spamtrap42@jacob21819.net
    (Yes, that is one of my email addresses.)

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)