mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 16:03:21 +02:00
Avoid queing multiple updates
svn path=/trunk/gtk-sharp/; revision=8138
This commit is contained in:
parent
bf28355d1e
commit
df69cbac6f
@ -1,3 +1,7 @@
|
|||||||
|
2002-10-10 Miguel de Icaza <miguel@ximian.com>
|
||||||
|
|
||||||
|
* gtk/ThreadNotify.cs: Avoid multiple notifications.
|
||||||
|
|
||||||
2002-10-09 Miguel de Icaza <miguel@ximian.com>
|
2002-10-09 Miguel de Icaza <miguel@ximian.com>
|
||||||
|
|
||||||
* glue/adjustment.c (gtksharp_gtk_adjustment_get_page_size): Added
|
* glue/adjustment.c (gtksharp_gtk_adjustment_get_page_size): Added
|
||||||
|
@ -68,12 +68,17 @@ namespace Gtk {
|
|||||||
byte s;
|
byte s;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
read (pipes [0], &s, 1);
|
lock (this) {
|
||||||
|
read (pipes [0], &s, 1);
|
||||||
|
notified = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
re ();
|
re ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool notified = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoke this function from a thread to call the `ReadyEvent'
|
/// Invoke this function from a thread to call the `ReadyEvent'
|
||||||
/// delegate provided in the constructor on the Main Gtk thread
|
/// delegate provided in the constructor on the Main Gtk thread
|
||||||
@ -82,7 +87,13 @@ namespace Gtk {
|
|||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
byte s;
|
byte s;
|
||||||
write (pipes [1], &s, 1);
|
|
||||||
|
lock (this){
|
||||||
|
if (notified)
|
||||||
|
return;
|
||||||
|
write (pipes [1], &s, 1);
|
||||||
|
notified = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user