On Thu, Jan 06, 2011 at 09:17:13PM +0100, Bram Moolenaar wrote:
> Yukihiro Nakadaira wrote:
> > >> Am 29.12.2010 18:41, schrieb Roy Jamison:
> > >>> Description:
> > >>>
> > >>> gvim does not correctly resize the window when the first tab is opened,
> > >>> part of the window becomes hidden behind task panel, thus hiding the :ex
> > >>> command and status area making it necessary to manually resize the
> > >>> window again.
> > >>>
> > >>> Recreate:
> > >>>       1) launch gvim
> > >>>       2) expand the window to full size
> > >>>       3) :tabnew test.txt
> > >>>
> > >>> Result:
> > >>> The tab is created properly, but the bottom of the window is forced
> > >>> downward, proportionately to the height of the tab, and behind the task
> > >>> panel of the Gnome desktop.
> > 
> > This problem occurred when using multi monitor and screen height is
> > larger than maximized window height.  For example, when using vertical
> > layout.
> > 
> > +----------+
> > |          |
> > | monitor1 |
> > |          |
> > +----------+
> > |          |
> > | monitor2 |
> > |          |
> > +----------+
> > 
> > Please check the following patch.
> > 
> > diff --git a/src/gui.c b/src/gui.c
> > --- a/src/gui.c
> > +++ b/src/gui.c
> > @@ -1402,7 +1402,7 @@
> >       if (!gui.shell_created)
> >     return;
> > 
> > -#ifdef MSWIN
> > +#if defined(MSWIN) || defined(FEAT_GUI_GTK)
> >       /* If not setting to a user specified size and maximized, calculate 
> > the
> >        * number of characters that fit in the maximized window. */
> >       if (!mustset && gui_mch_maximized())
> > diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
> > --- a/src/gui_gtk_x11.c
> > +++ b/src/gui_gtk_x11.c
> > @@ -3901,6 +3901,17 @@
> >     gtk_window_unmaximize(GTK_WINDOW(gui.mainwin));
> >   }
> > 
> > +    void
> > +gui_mch_newfont()
> > +{
> > +    int w, h;
> > +
> > +    gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
> > +    w -= get_menu_tool_width();
> > +    h -= get_menu_tool_height();
> > +    gui_resize_shell(w, h);
> > +}
> > +
> >   /*
> >    * Set the windows size.
> >    */
> > diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro
> > --- a/src/proto/gui_gtk_x11.pro
> > +++ b/src/proto/gui_gtk_x11.pro
> > @@ -20,6 +20,7 @@
> >   void gui_mch_set_winpos __ARGS((int x, int y));
> >   int gui_mch_maximized __ARGS((void));
> >   void gui_mch_unmaximize __ARGS((void));
> > +void gui_mch_newfont __ARGS((void));
> >   void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, 
> > int min_height, int base_width, int 
> > base_height, int direction));
> >   void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
> >   void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
> 
> Please try out this patch.  Resizing has always been a problem with GTK,
> this needs to be tried out in various configurations.  I don't have a
> vertical monitor setup.

I haven't seen any further status on this.  Has anyone with setups like
Yukihiro described verified whether the patch works properly?

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui