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

Mouse hot-plugging should work consistent for SunToolkit and MouseInfo classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 7-pool
    • 7
    • client-libs
    • generic
    • generic

      Now the MouseInfo.getNumberOfButtons() method deals with the desktop property which is installed only once (at the toolkit init) and then remains the same. At the same time, SunToolkit (well, the underlying concrete toolkit class) goes into the native system for property value when we call its method getNumberOfButtons(). That means that the number of buttons will vary for these two approaches when somebody will change the mouse device on-the-fly.
      Moreover, the spec for the MouseInfo class says that it returns the number of buttons on the mouse. I'd read it that it will always report *actual* mouse buttons number even if I change the mouse itself. But as already mentioned in the first sentence, now we return some cached number of buttons which isn't aligned with the spec.

            serb Sergey Bylokhov
            dav Andrei Dmitriev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: