Loading ...
Sorry, an error occurred while loading the content.

Re: Bugfix: Vim6.0n & Motif Scrollbars

Expand Messages
  • Bram Moolenaar
    ... I see the problem. Since this is a Motif-specific problem, I would prefer to solve in gui_motif.c. See the patch below. Actually, it s strange that the
    Message 1 of 2 , Nov 29, 2000
    • 0 Attachment
      David Harrison wrote:

      > This is just a cosmetic change, but it was driving me nuts. It has been
      > tested on IRIX Motif 1.2.3 and Linux Motif 2.1.30 and Linux Gtk. Everything
      > seems more consistent now.
      >
      > Problem:
      > In Motif (and ONLY Motif), the scrollbars were "gui.border_offset" pixels
      > too far down.
      >
      >
      > How to reproduce:
      > Load up gvim.
      > type ":set guioptions+=rl"
      > Now, load in a file.
      > Split the file into windows with "CTRL-W s" three or four times.
      > Notice how the bottom of the scrollbar dips below the windows's status line.
      >
      >
      >
      > Proposed Solution:
      > In Motif only, it seems that it is only necessary to subtract the
      > border_offset from the y position of the scrollbars. No "special case"
      > handling of the topmost scrollbar is really necessary.
      >
      >
      > Here is a patch; maybe there is a cleaner way.. I don't have much time to
      > tinker with this?:

      I see the problem. Since this is a Motif-specific problem, I would prefer to
      solve in gui_motif.c. See the patch below.

      Actually, it's strange that the border offset is added this way. But changing
      this would require the need to change it for all GUI versions (and test it).

      *** ../dist/vim60n/src/gui_motif.c Tue Nov 14 14:42:10 2000
      --- gui_motif.c Wed Nov 29 21:23:47 2000
      ***************
      *** 991,1001 ****
      --- 991,1007 ----
      if (sb->id != (Widget)0)
      {
      if (sb->type == SBAR_LEFT || sb->type == SBAR_RIGHT)
      + {
      + if (y == 0)
      + h -= gui.border_offset;
      + else
      + y -= gui.border_offset;
      XtVaSetValues(sb->id,
      XmNtopOffset, y,
      XmNbottomOffset, -y - h,
      XmNwidth, w,
      NULL);
      + }
      else
      XtVaSetValues(sb->id,
      XmNtopOffset, y,

      --
      GUARD #1: What, ridden on a horse?
      ARTHUR: Yes!
      GUARD #1: You're using coconuts!
      ARTHUR: What?
      GUARD #1: You've got two empty halves of coconut and you're bangin' 'em
      together.
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.