コード例 #1
0
        public static void HandleMyWinScreenChanged(object o, ScreenChangedArgs args)
        {
            Gtk.Widget widget = (Gtk.Widget)o;
            Gdk.Colormap colormap = widget.Screen.RgbaColormap;

            if(colormap == null) {
                colormap = widget.Screen.RgbColormap;
            }

            widget.Colormap = colormap;
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: MASGAU/gtk-sharp-ribbon
        private void Window_OnScreenChanged(object Send, ScreenChangedArgs args)
        {
            Gdk.Colormap cm = Screen.RgbaColormap;
            composeAvailable = cm != null;	// FIX: Do not seem to detect compose support in all cases

            if(!composeAvailable) cm = Screen.RgbColormap;
            Colormap = cm;

            Console.WriteLine ("Compose Support: " + composeAvailable);
        }
コード例 #3
0
ファイル: Selector.cs プロジェクト: torvall/pixclip-linux
 void OnScreenChanged(object o, ScreenChangedArgs args)
 {
     Console.WriteLine("selector: screen changed");
     Widget win = (Widget) o;
     Gdk.Colormap tempMap = win.Screen.RgbaColormap;
     if(tempMap == null) {
         tempMap = win.Screen.RgbColormap;
         bSupportsAlpha = false;
     } else {
         bSupportsAlpha = true;
     }
     win.Colormap = tempMap;
 }