block signal
- From: Frederic Cazenave <cazenave radar mcgill ca>
- To: gtk-app-devel-list gnome org
- Subject: block signal
- Date: Wed, 13 Jun 2001 13:29:02 +0000
Hi,
on my application, I try to use gtk_signal_handler_block and
gtk_signal_handler_unblock to
prevent any flickering when I change the size of my window with my
mouse.
So when I select the widget I apply a gtk_signal_block to the
expose_event and my release_button
function is as follow :
static gint
plot_button_release_event (GtkWidget *widget, GdkEventButton *event)
{
gint return_val;
if (Selected != NULL){
gdk_window_set_cursor(Selected->window,
gdk_cursor_new(GDK_TOP_LEFT_ARROW));
gtk_signal_handler_unblock(GTK_OBJECT(widget),PLOT(widget)->configure_id);
gtk_drawing_area_size
(&(PLOT(widget)->draw),PLOT(widget)->size_x,PLOT(widget)->size_y);
}
}
with PLOT(widget)->configure_id is the id of the expose_event signal
return
but gtk_signal_connect and
PLOT(widget)->size_x and PLOT(widget)->size_y are the new size.
gtk_drawing_area_size should emit a expose event but if I block and
unblock the signal
then it seems the unblock as no effect.
Fred
--
_________________________________________________________
| |
| Frederic CAZENAVE |
| _/\_ /^= McGill Radar |
| \_/ \// Box 198, MacDonald College |
| | /-\ | Ste Anne de Bellevue |
| || || Quebec, Canada H9X 3V9 |
| Tel (514) 398 7733 fax (514) 398 7755 |
| mailto:Frederic Cazenave hmg inpg fr |
| http://www.mpl.orstom.fr/hydrologie/catch/ |
|__________________________________________________________|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]