IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24990


Ignore:
Timestamp:
Aug 4, 2009, 8:38:39 AM (17 years ago)
Author:
eugene
Message:

true color before direct color

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/Ohana/src/kapa2/src/CheckVisual.c

    r24800 r24990  
    3737  isColor = isDefault = FALSE;
    3838
     39  // attempt to select the most desirable type of visual: TrueColor
     40  for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
     41  if (i != Nfound) {
     42    isColor = TRUE;
     43    if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
     44    isDefault = (graphic[0].visual == visual_list[i].visual);
     45    graphic[0].visual = visual_list[i].visual;
     46    graphic[0].dynamicColors = FALSE;
     47    if (DEBUG) fprintf (stderr, "got TrueColor visual\n");
     48    goto test_pixels;
     49  }
     50
    3951  // attempt to select the most desirable type of visual: DirectColor
    4052  for (i = 0; (i < Nfound) && (visual_list[i].class != DirectColor); i++);
     
    4658    graphic[0].dynamicColors = TRUE;
    4759    if (DEBUG) fprintf (stderr, "got DirectColor visual\n");
    48     goto test_pixels;
    49   }
    50 
    51   // attempt to select the most desirable type of visual: TrueColor
    52   for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
    53   if (i != Nfound) {
    54     isColor = TRUE;
    55     if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
    56     isDefault = (graphic[0].visual == visual_list[i].visual);
    57     graphic[0].visual = visual_list[i].visual;
    58     graphic[0].dynamicColors = FALSE;
    59     if (DEBUG) fprintf (stderr, "got TrueColor visual\n");
    6060    goto test_pixels;
    6161  }
Note: See TracChangeset for help on using the changeset viewer.