[Geany-devel] [PATCH] : FIx window position on start up.

Dimitar Zhekov dimitar.zhekov at xxxxx
Fri May 4 17:19:51 UTC 2012


On Thu, 3 May 2012 21:30:46 +1000
Erik de Castro Lopo <mle+tools at 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_*.

-- 
E-gards: Jimmy



More information about the Devel mailing list