Hi all,
I often ssh from the desktop machine (screen size of 2560x1440) into my laptop (1200x800) and X-Display geany from my laptop back to the desktop. If I then place the geany window in the bottom right hand corner of the screen, exit geany and then reopen geany on the laptop, the geany window ends up off screen.
The included patch checks the window position read from the preferences file, checks to see if its off either the right hand side or bottom of the screen and moves it back into a sensible position.
Cheers, Erik
Erik de Castro Lopo wrote:
The included patch checks the window position read from the preferences file, checks to see if its off either the right hand side or bottom of the screen and moves it back into a sensible position.
Nudge!
Anyone have any comments on this patch? Yeah? Nay? You look silly and I hate you?
Erik
On Thu, 3 May 2012 21:30:46 +1000 Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
The included patch checks the window position read from the preferences file, checks to see if its off either the right hand side or bottom of the screen and moves it back into a sensible position.
Anyone have any comments on this patch? Yeah? Nay? You look silly and I hate you?
I don't think it's a very good idea.
First, you switched from your large monitor to the small one, and Geany was repositioned. Next time you log in from the large monitor, it won't be in the lower right corner, and you'll have to move it there. Tit for tat, unless you somehow to maintain real (screen) and virtual (.conf) positions.
Second, what's to stop a window manager for using coordinates outside the screen for fullscreen, or even for maximizing? For example border 4, x1 = -4, width = 1288.
Third, the problem - if we consider it one - affects all GUI programs, which strongly suggests that it's a window manager's job, if anybody's, to fix such coordinates.
Fourth, I'm not sure how this will work for X11 session managed Geany, sm setups the window position differently.
Last but not least, why not write a small plugin, and attach the repositioning to "geany-startup-complete"?.. You don't really need to check prefs.save_winpos - if part of the main window is outside the screen, just move it. The main window is accessible from a plugin, and so are gtk_window_* and gdk_screen_*.