Re: not able to change color of widget

2013-11-01 Thread Ruslan Kabatsayev
Well, it worked. Didn't it work for you? Also, in the future please give _compilable_ code - it's no fun to fix compilation errors just to try it out. On Thu, Oct 31, 2013 at 3:11 PM, Mahesh Chaudhari wrote: > Ruslan , > that is working with mouse clicks (works for me also) > what I wanted is wi

Re: not able to change color of widget

2013-11-01 Thread Mahesh Chaudhari
thanks Ruslan, it worked, it meant problem lies with other logic (using INOTIFY to wait for file change) The entire code (clean compilable) is    #include #include #include #define EVENT_SIZE  ( sizeof (struct inotify_event) ) #define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) GtkWidget *button1,

Re: not able to change color of widget

2013-11-01 Thread Ruslan Kabatsayev
OK, now I see your problem. You set new color for the button, and don't really allow GTK to redraw it. I.e. you change color variable, but actual widget is not updated. Moreover, as your program is in busy waiting, the user can't interact with it. Let's think busy waiting is by design. Now you nee