[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
gdk_input; colored labels
- From: Tobias Peters <t-peters HRZ2 uni-oldenburg de>
- To: gtk-app-devel-list redhat com
- Subject: gdk_input; colored labels
- Date: Wed, 4 Aug 1999 15:21:22 +0200 (CEST)
Hello everyone, I am using gdk_input_add() to be notified when data has
been arriving on a tcp socket.
My problem is that the input callback function gets sometimes called with
a GdkInputCondition different from the one with which is was registered.
I am using gtk-- with gtk+ 1.0.6, this is the relevant part of the c++
code:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void
Kritzel_GtkClient::register_reading(void)
{
/* ... (set some internal flags) */
gdk_read_tag = gdk_input_add(get_fd(),
GDK_INPUT_READ,
& reading_possible,
this);
}
/*...*/
void //static member function
Kritzel_GtkClient::reading_possible (gpointer client_object,
gint fd,
GdkInputCondition condition)
// client_object is the registered instance.
{
assert(condition == GDK_INPUT_READ);
/*...*/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The assertion sometimes fails and condition has the value GDK_INPUT_WRITE,
even if I do not register any other callback with gdk_input_add().
Even worse, sometimes my callback function does not get called at all even
when data has arrived (I was watching the write(2) call in the server app
with the debugger).
Is this a known bug in gtk/gdk 1.0.6, any workarounds, anything I miss
here?
I want to change the color of the text in some labels. Changing the
foreground and text colors in a style and setting that style did not do
it. How to do this?
Thanks for reading, Tobias
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]