fatdog-control-panel.sh : default window open position

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
fatdoguser
Posts: 175
Joined: Sat Aug 05, 2023 10:54 am
Has thanked: 22 times
Been thanked: 79 times

fatdog-control-panel.sh : default window open position

Post by fatdoguser »

/usr/sbin/fatdog-control-panel.sh

line 99

Code: Select all

"--center" \

should be removed

On a panning window system the window does not open near the mouse but instead more often will be 'off screen' (out of view).

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: fatdog-control-panel.sh : default window open position

Post by step »

I understand. If the real screen size is but a fraction of the virtual panning screen size, the virtual center is way off (screen) with respect to the real center. Removing "--center" allows the window manager to automatically position the window. But where? It depends on the window manager. Can you please try openbox with its default configuration instead of twm? Fill the real screen with other windows then start the control panel: does it open in the real screen or stil "off screen"?

To make the control panel and any yad dialog open under the mouse, replace "--center" with "--mouse". If the script that runs yad doesn't include dialog positioning options itself (--center, --posx, --posy, --geometry) you can try the environment variable YAD_OPTIONS, which has lower priority than command-line options, e.g., YAD_OPTIONS="--mouse" yad &

Several Fatdog64 stock utilities relying on yad and Xdialog set a fixed center position for their main dialog. I suppose the rationale is that the dialog is important enough to give it a special position, where it's more likely to catch the user's sight. The user of a standard - and probably outdated by modern standards - computer monitor.

User avatar
p310don
Posts: 290
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 55 times
Been thanked: 92 times

Re: fatdog-control-panel.sh : default window open position

Post by p310don »

It's annoyed me for a bit. I usually use dual monitors, so when I open it up it opens right in the middle, half on the left monitor and half on the right

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: fatdog-control-panel.sh : default window open position

Post by step »

p310don wrote: Tue Mar 05, 2024 7:22 am

It's annoyed me for a bit. I usually use dual monitors, so when I open it up it opens right in the middle, half on the left monitor and half on the right

Yes, that it a problem with dual monitors. This could be fixed in yad source code by making it always --center wrt the primary monitor. Currently yad has no knowledge of a primary monitor.

fatdoguser
Posts: 175
Joined: Sat Aug 05, 2023 10:54 am
Has thanked: 22 times
Been thanked: 79 times

Re: fatdog-control-panel.sh : default window open position

Post by fatdoguser »

step wrote: Tue Mar 05, 2024 7:14 am

I understand. If the real screen size is but a fraction of the virtual panning screen size, the virtual center is way off (screen) with respect to the real center. Removing "--center" allows the window manager to automatically position the window. But where? It depends on the window manager. Can you please try openbox with its default configuration instead of twm? Fill the real screen with other windows then start the control panel: does it open in the real screen or stil "off screen"?

To make the control panel and any yad dialog open under the mouse, replace "--center" with "--mouse". If the script that runs yad doesn't include dialog positioning options itself (--center, --posx, --posy, --geometry) you can try the environment variable YAD_OPTIONS, which has lower priority than command-line options, e.g., YAD_OPTIONS="--mouse" yad &

Several Fatdog64 stock utilities relying on yad and Xdialog set a fixed center position for their main dialog. I suppose the rationale is that the dialog is important enough to give it a special position, where it's more likely to catch the user's sight. The user of a standard - and probably outdated by modern standards - computer monitor.

Bulk standard Fatdog boot with a lower res main system, higher res HDMI monitor attached and with the default OpenBox wm, screen filled with a (large) terminal and smaller rox windows, launching the control panel and it is is totally off-screen of the main system.

With --mouse instead of --center the control panel is mostly/partially visible, the top part (when the mouse is down at the bottom of screen where the default positioned panel/tray control panel launch button was clicked), visible enough to grab its title bar and drag the window fully into view.

xrandr --panning isn't a outdated standard. Nor is having a attached monitor set to be vertical alongside a lower res 'regular' main system/laptop. HD (1366x768) laptop, 1080 HDMI arranged vertically (1080x1920) and the Y center is 960 which is > the Y bottom of 768. The likes of vnc are also more common nowadays, where the remote system may very well be using a different resolution to the server system.

The 'importance' of the window could be 'increased' by ensuring the window had a higher window layer (on top, layer 1, whatever) but I expect that wouldn't really be necessary.

But where?

--mouse

A similar situation occurs with the default position of the LXQT tray/panel being at the bottom of screen by default, generally its better to have that at the top of screen by default (or maybe left hand screen edge, however whilst some do suggest that the left screen edge is the 'correct' place for the panel/tray, on the basis that takes up "less space" ... on the assumption that Width > Height, fundamentally bottom is ... a hangover from Windows, left is a assumption of W > H, both of which are dated). Dynamic resolution changes or other factors and the panel being at the top of screen is consistent, whereas when set to be at the bottom of screen can have the panel end up hanging in a odd position, "out of place/mid screen".

Changing to both panel at top, admin dialogs opened at mouse position would be more in keeping with more modern kit/systems.

The drives can also end up in weird places when aligned to the bottom of screen/near panel/tray. A dynamic change of resolution and then mount a drive and the newly mounted drive icon can be disconnected from the others, such as being way down at the bottom whereas the other drives are more mid-screen. Again if the panel/tray is at the top of screen, drives just below that then resolution changes has positioning more consistent/stable.

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: fatdog-control-panel.sh : default window open position

Post by step »

Thank you for testing.

Bulk standard Fatdog boot with a lower res main system, higher res HDMI monitor attached and with the default OpenBox wm, screen filled with a (large) terminal and smaller rox windows, launching the control panel and it is is totally off-screen of the main system.

I expected it to be in the center of the screen due to --center.

xrandr --panning isn't a outdated standard. Nor is having a attached monitor set to be vertical alongside a lower res 'regular' main system/laptop. HD (1366x768) laptop, 1080 HDMI arranged vertically (1080x1920) and the Y center is 960 which is > the Y bottom of 768. The likes of vnc are also more common nowadays, where the remote system may very well be using a different resolution to the server system.

I wasn't clear enough. I didn't mean to say that using xrandr --panning, dual monitors, vnc etc. is outdated. Quite the contrary. But Fatdog's default UI is deliberately "one size fits all", lean and simple enough, somewhat outdated. I'm sure that some people prefer it that way while some don't; some people will agree with my opinion while some won't, and so on. Personally, for my desktop, which accommodates frequent VNC sessions, 1:1, 16:9 and 16:10 monitors, laptops and a netbook, I can't specialize too much one case vs another. So, I try to find an optimal middle ground for my use. I change the WM theme but keep openbox (I like stacking WMs, and have defined a couple of openbox key bindings for when I want to tile windows). Mostly, I live in terminals with tmux. I keep lxqt-panel vertically on the left side, drive icons at the bottom (64 px above the edge, to be precise).

The 'importance' of the window could be 'increased' by ensuring the window had a higher window layer (on top, layer 1, whatever) but I expect that wouldn't really be necessary.

fatdog-wireless-antenna.sh does that (yad).

Changing to both panel at top, admin dialogs opened at mouse position would be more in keeping with more modern kit/systems.

I kind of like the idea of opening dialogs at mouse position. However, as you experienced, one can easily end up with the dialog partially off screen, and have to drag it back on screen. That's not good.

The drives can also end up in weird places when aligned to the bottom of screen/near panel/tray. A dynamic change of resolution and then mount a drive and the newly mounted drive icon can be disconnected from the others, such as being way down at the bottom whereas the other drives are more mid-screen. Again if the panel/tray is at the top of screen, drives just below that then resolution changes has positioning more consistent/stable.

When this happens, one can right click a drive icon and select "redraw all icons".

fatdoguser
Posts: 175
Joined: Sat Aug 05, 2023 10:54 am
Has thanked: 22 times
Been thanked: 79 times

Re: fatdog-control-panel.sh : default window open position

Post by fatdoguser »

step wrote: Tue Mar 05, 2024 4:13 pm

I kind of like the idea of opening dialogs at mouse position. However, as you experienced, one can easily end up with the dialog partially off screen, and have to drag it back on screen. That's not good.

If the control panel icon in the bottom tray is clicked then yes, --mouse will have just the top half of the window visible, but where at least the window title bar is visible so that it can be dragged into view. That's better than it being totally off-screen. For a panel at top of screen the full window is visible. As is if a top left menu button system is used to navigate to and open the control panel via the menu system.

When this happens, one can right click a drive icon and select "redraw all icons".

... or if at the top of screen the drives just continue to remain more aligned without having to right-click and redraw.

But I guess if the target Fatdog audience capture is Windows users, who tend to use a fixed screen/resolution, not vnc etc. then as-is suffices. For those more *nix aware and tweaking the configuration to reposition the tray/drives is a simple matter. Changing the scripts to use --mouse instead of --center isn't that much more of a effort, and even then some standard programs also do the same, for instance Libre Office close ... without having saved any changes and its quit without saving prompt is also centered rather than at the mouse position. Bad practice, but so also is the web riddled with bad practices. Life.

Post Reply

Return to “FatDog64”