projects
/
projects
/
chimara
/
chimara.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce6091d
)
Use gdk_window_process_all_updates() to send window update events immediately instead...
author
fliep
<fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Tue, 19 May 2009 21:07:56 +0000
(21:07 +0000)
committer
fliep
<fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Tue, 19 May 2009 21:07:56 +0000
(21:07 +0000)
src/window.c
patch
|
blob
|
history
diff --git
a/src/window.c
b/src/window.c
index aa894c6a9f84b7d511170872069b8ef353d824a1..cd0961c4ea5469e1dbd434af76db44339d11551d 100644
(file)
--- a/
src/window.c
+++ b/
src/window.c
@@
-563,7
+563,8
@@
glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype,
/* Set the window as a child of the Glk widget */
gtk_widget_set_parent(win->frame, GTK_WIDGET(glk_data->self));
gtk_widget_queue_resize(GTK_WIDGET(glk_data->self));
/* Set the window as a child of the Glk widget */
gtk_widget_set_parent(win->frame, GTK_WIDGET(glk_data->self));
gtk_widget_queue_resize(GTK_WIDGET(glk_data->self));
-
+ gdk_window_process_all_updates();
+
gdk_threads_leave();
/* For blank or pair windows, this is almost a no-op. For text grid and
gdk_threads_leave();
/* For blank or pair windows, this is almost a no-op. For text grid and
@@
-771,6
+772,7
@@
glk_window_close(winid_t win, stream_result_t *result)
/* Schedule a redraw */
gdk_threads_enter();
gtk_widget_queue_resize( GTK_WIDGET(glk_data->self) );
/* Schedule a redraw */
gdk_threads_enter();
gtk_widget_queue_resize( GTK_WIDGET(glk_data->self) );
+ gdk_window_process_all_updates();
gdk_threads_leave();
}
gdk_threads_leave();
}
@@
-988,6
+990,7
@@
glk_window_get_size(winid_t win, glui32 *widthptr, glui32 *heightptr)
case wintype_TextGrid:
gdk_threads_enter();
/* Wait for the window to be drawn, and then cache the width and height */
case wintype_TextGrid:
gdk_threads_enter();
/* Wait for the window to be drawn, and then cache the width and height */
+ gdk_window_process_all_updates();
while(win->widget->allocation.width == 1 && win->widget->allocation.height == 1)
{
/* Release the GDK lock momentarily */
while(win->widget->allocation.width == 1 && win->widget->allocation.height == 1)
{
/* Release the GDK lock momentarily */
@@
-996,7
+999,8
@@
glk_window_get_size(winid_t win, glui32 *widthptr, glui32 *heightptr)
while(gtk_events_pending())
gtk_main_iteration();
}
while(gtk_events_pending())
gtk_main_iteration();
}
- win->width = (glui32)(win->widget->allocation.width / win->unit_width);
+
+ win->width = (glui32)(win->widget->allocation.width / win->unit_width);
win->height = (glui32)(win->widget->allocation.height / win->unit_height);
gdk_threads_leave();
win->height = (glui32)(win->widget->allocation.height / win->unit_height);
gdk_threads_leave();
@@
-1017,7
+1021,8
@@
glk_window_get_size(winid_t win, glui32 *widthptr, glui32 *heightptr)
} */
/* Instead, we wait for GTK to draw the widget. This is probably very slow and should be fixed. */
} */
/* Instead, we wait for GTK to draw the widget. This is probably very slow and should be fixed. */
- while(win->widget->allocation.width == 1 && win->widget->allocation.height == 1)
+ gdk_window_process_all_updates();
+ while(win->widget->allocation.width == 1 && win->widget->allocation.height == 1)
{
/* Release the GDK lock momentarily */
gdk_threads_leave();
{
/* Release the GDK lock momentarily */
gdk_threads_leave();