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

Linux: ensure consistent GraphicsConfiguration when number of screens changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7
    • client-libs
    • None
    • 7
    • linux

      The code in sun.awt.X11.XCanvasPeer#getAppropriateGraphicsConfiguration() that attempts to get a GraphicsConfiguration with the same visual on the "new" screen seems to incorrectly rely on the screen number to do so.

      There are two cases to consider:
      * If the list of devices was not changed then the "screenid" for old device is the index of that "old" device in the device array. So the new and old devices are the same.
      * If the list of devices was changed, then the "screenid" for the old device was invalidated, and it is again an index of that "old" device in the device array.

      Also I do not think that we can change the "requested device" in this method. The purpose of this method is to request the best "GC" from the device passed as a parameter(via another GC).

            Unassigned Unassigned
            mkartashev Maxim Kartashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: