Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4147997

frame border dimensions ignored with fvwm (1.1.x ONLY)



    • Subcomponent:
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_2.5.1, solaris_2.6


      Name: el35337 Date: 06/11/98

      Using the fvwm window manager, in JDK 1.1.6
      and 1.2Beta3 it appears that the border dimensions
      are ignored when determining window locations.
      As a result, placing a frame at 0,0 places the
      window contained by the frame at 0,0 and leaves
      the title border above the screen and inaccessable.

      This bug is being submitted on behalf of a
      large Sun customer by a Sun Systems Engineer.

      import java.awt.*;
      import java.awt.event.*;

      class Main extends Frame {
          // The contructor creates a frame with a window size that gives
          // the desired interior size.
          Main() {
              super("Frame Example");
              // Calling addNotify() creates the peers; otherwise insets()
              // does not return the right values.

              Insets insets = getInsets();
              setSize(insets.left + insets.right + 150,
                      insets.top + insets.bottom + 150);

              // Add listener
              this.addMouseListener(new MouseEventHandler());


          class MouseEventHandler extends MouseAdapter {
              public void mousePressed(MouseEvent evt) {
                  // x, y are in interior coordinates
                  // must be translated to screen coordinates.
                  Rectangle bounds = getBounds();
      //System.out.println("evt " + evt.getX() + " " + evt.getY());
                  //System.out.println("bnd " + bounds.x + " " + bounds.y);
                  int x = evt.getX() + bounds.x;
                  int y = evt.getY() + bounds.y;

                  // Set location of new frame
                  Main m = new Main();
                  //m.setLocation(X, Y);

          static public void main(String[] args) {
              (new Main()).show();

      From: Andy Wick <###@###.###>
      To: Brian Jeltema-Sun-Richmond VA-SE <###@###.###>, ###@###.###
      Subject: Re: 1.1.6 Java Bug
      Mime-Version: 1.0

      AIM = AOL Instant Messenger. The Java version can be downloaded from
      http://www.aol.com/aim/downloadjava.html If you don't have a
      screen name yet, you need to start at http://www.aol.com/aim/ and get
      one first. You are welcome to "im" me at screen name "AndyWick".
      It would be great if we could get JavaSoft and/or SUN people using
      AIM, especially since it *IS* now included on some *SUN* CD. :-)

      Fvwm is a window manager, similiar to mwm, but it supports virtual screens
      and lots more features. It is a very common window manager used
      by programmers that I work with. You can get it at
      ftp://ftp.hpc.uh.edu/pub/fvwm/version-2 I am using version 2.0.46

      The bug itself is caused by the borders of the frames being ignored.
      So this means the inside of the frame is considered 0,0 instead of
      including the border. Say the width of the frame border is 10 pixels.
      If I say place a frame at (0, 0), in reality the inside of the
      frame would be (10,10) because the borders would be (0,0). In version
      1.1.6 and 1.2beta3 they don't coun't the borders, so the borders show
      up "offscreen". ie I say frame.setLocation(0,0) in reality does
      setLocation(-10, -10).

      (Review ID: 29458)


          Issue Links



              lbunnisunw Lara Bunni (Inactive)
              elarsen Erik Larsen (Inactive)
              0 Vote for this issue
              0 Start watching this issue