window size and position

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

archimboldi
Atarian
Atarian
Posts: 2
Joined: Sun Sep 30, 2018 7:26 pm

window size and position

Postby archimboldi » Sun Sep 30, 2018 7:31 pm

hi,
start using Hatari on Mac, wanted to know if there's a way to save the size and position of Hatari window, when loaded Hatari always go to the center of the screen, just checking if there's a way to load Hatari in any position of the screen,
thanks.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1805
Joined: Sun Jul 31, 2011 1:11 pm

Re: window size and position

Postby Eero Tamminen » Tue Oct 02, 2018 6:18 pm

SDL doesn't seem to have any environment variables that user could use to specify window position.

Hatari doesn't currently specify window position to SDL, and for now it doesn't have any options to specify that either.

If such options (e.g. "--win-x <x> --win-y <y>") would be added to Hatari, when they should have an effect:
* Only on first window opening
* When the window gets re-created (happens e.g. when fullscreen mode is toggled)
?

Note: specifying size wouldn't be sensible because Atari screen size depends on which machine type, monitor type and screen mode is selected (and those can be set in config file, command line, and through control socket). Some Falcon demos can also change their resolution several times while they're running (there's even one demo that at one point changes resolution several times per second for one effect).

User avatar
xc8
Captain Atari
Captain Atari
Posts: 215
Joined: Mon Aug 11, 2008 5:23 pm
Location: B'ham, UK

Re: window size and position

Postby xc8 » Tue Oct 02, 2018 7:03 pm

technicaly this could be possible by using a custom script that uses wmctrl + xwininfo (at least under linux, I bet OSX has the same or similar utils)

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1805
Joined: Sun Jul 31, 2011 1:11 pm

Re: window size and position

Postby Eero Tamminen » Thu Oct 04, 2018 5:22 pm

Seems to work fine (-1 values for x & y position means that they shouldn't be modified):

Code: Select all

wmctrl -r "Hatari v2.1.0" -e 0,-1,-1,800,600


But how one could trigger something like that when Hatari starts, by using script that starts hatari, waits few secs and then runs wmctrl?

I remember that with some window managers one could also configure positions of windows (that have e.g. specific titles) in the window manager config. Last time I used something like that was in the 90's though. :-)

PS. the ":SELECT:" option for wmctrl is nice, it then waits user to click on the window on which he wants it to act on.

User avatar
xc8
Captain Atari
Captain Atari
Posts: 215
Joined: Mon Aug 11, 2008 5:23 pm
Location: B'ham, UK

Re: window size and position

Postby xc8 » Thu Oct 04, 2018 6:45 pm

IIRC olwm supported something like this, but in fact the app supposed to be compiled for that.

anyway other option is using xdotool using a script like this:

Code: Select all

hatari &
sleep 2
xdotool search --name "Hatari" windowsize 100  100
xdotool search --name "Hatari" windowmove 10  10

ThorstenOtto
Captain Atari
Captain Atari
Posts: 441
Joined: Sun Aug 03, 2014 5:54 pm

Re: window size and position

Postby ThorstenOtto » Thu Oct 04, 2018 9:53 pm

In kwin (the window manager of KDE) you can also specify things like this, based on program name or window title.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 831
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: window size and position

Postby dhedberg » Fri Oct 05, 2018 5:35 pm

Eero Tamminen wrote:Some Falcon demos can also change their resolution several times while they're running (there's even one demo that at one point changes resolution several times per second for one effect).

Now that made me curious. What demo and what effect?
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1805
Joined: Sun Jul 31, 2011 1:11 pm

Re: window size and position

Postby Eero Tamminen » Fri Oct 05, 2018 5:45 pm

I think that demo was "Yepyha" by Toons: http://www.pouet.net/prod.php?which=8584

It has several screens that do frequent resolution changes.

Before Hatari had aspect-ratio scaling for Videl emulation (or supported SDL v2), it was impossible to view in fullscreen on my LCD monitor as that took several seconds to change to new resolution requested by Hatari.

archimboldi
Atarian
Atarian
Posts: 2
Joined: Sun Sep 30, 2018 7:26 pm

Re: window size and position

Postby archimboldi » Sat Oct 06, 2018 10:46 am

Hi, I installed a windows manager, load Hatari and then one or two shortcuts (depend on the wm) and it goes where I want, as for the other option, scrips, code..im not familiar with it , thanks.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 3 guests