aboutsummaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-05 00:37:10 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-12-05 00:37:10 +0100
commit78592468fe75f09299e12d8a8fbb94635a2befd6 (patch)
tree0b38ad59d17393e5ad44a3980962bc30e283225e /src
parent9d381671ec0b1266448eddbf4c4935cdc7d23a9f (diff)
divers
Diffstat (limited to 'src')
-rw-r--r--src/Gradient.cs5
-rw-r--r--src/GraphicObjects/PrivateContainer.cs4
-rw-r--r--src/Interface.cs7
-rw-r--r--src/backends/xlib/XLibBackend.cs4
4 files changed, 12 insertions, 8 deletions
diff --git a/src/Gradient.cs b/src/Gradient.cs
index 0806e885..2630c42a 100644
--- a/src/Gradient.cs
+++ b/src/Gradient.cs
@@ -96,8 +96,11 @@ namespace Crow
throw new NotImplementedException ();
}
- foreach (ColorStop cs in Stops)
+ foreach (ColorStop cs in Stops) {
+ if (cs == null)
+ continue;
grad.AddColorStop (cs.Offset, cs.Color);
+ }
ctx.SetSource (grad);
grad.Dispose ();
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index 41918bc8..0f9b0c59 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -51,7 +51,9 @@ namespace Crow
go = null;
if (base.FindByDesignID (designID, out go))
return true;
- return (bool)child?.FindByDesignID (designID, out go);
+ if (child == null)
+ return false;
+ return child.FindByDesignID (designID, out go);
}
#endif
protected GraphicObject child;
diff --git a/src/Interface.cs b/src/Interface.cs
index 3c586685..f2d6a1ce 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -129,8 +129,8 @@ namespace Crow
Keyboard.KeyUp += Keyboard_KeyUp;
Keyboard.KeyPress += Keyboard_KeyPress;
- //initTooltip ();
- //initContextMenus ();
+ initTooltip ();
+ initContextMenus ();
running = true;
@@ -173,8 +173,7 @@ namespace Crow
{
while (running) {
Update ();
-
- Thread.Sleep (1);
+ Thread.Sleep (5);
}
}
diff --git a/src/backends/xlib/XLibBackend.cs b/src/backends/xlib/XLibBackend.cs
index 81500c03..a123e204 100644
--- a/src/backends/xlib/XLibBackend.cs
+++ b/src/backends/xlib/XLibBackend.cs
@@ -35,9 +35,9 @@ namespace Crow.XLib
[DllImportAttribute("X11")]
static extern int XInitThreads();
[DllImportAttribute("X11")]
- static extern IntPtr XOpenDisplay(IntPtr displayName);
+ internal static extern IntPtr XOpenDisplay(IntPtr displayName);
[DllImportAttribute("X11")]
- static extern IntPtr XCloseDisplay(IntPtr disp);
+ internal static extern IntPtr XCloseDisplay(IntPtr disp);
[DllImportAttribute("X11")]
static extern Int32 XDefaultScreen(IntPtr disp);
[DllImportAttribute("X11")]