Re: Window Visibility Signal



On Monday 25 July 2005 12:38 pm, Zeeshan Ali wrote:
Hello,

        Expose is no problem, but what about when it is hid? basically I
want to know when the window is hid, so I don't draw to it.

   If you only want to check if a widget is visible or not at a
particular time, you'll need to check for the 'visible' property of
the widget. Moreover, 'expose' signal is called for both the cases
(show and hide). If you choose to go the 'expose' way then connect
your handler using g_signal_connect_after().

Nice tip, but unfortunately the expose event does not signal when the object 
is covered up. Only when revealed. I even hooked "event" and "event-after" 
and nothing was emitted when I covered up the window. Only events were 
triggered when I moved the mouse into the window and out of it and clicks.

The code is doing the following...

        Runs an external process in a thread and what I want is that when the window 
is covered up, I want to pause the external process (I can do this via a 
pipe). When the window is revealed I want the external process to continue 
on. Which I then can send it another signal via the pipe. So the code is not 
a loop while it is paused. So I can't check at a regular interval to wake it 
up.

I was hoping I could get signals to tell me when the window was revealed or 
not so that I could pause for example when a screen saver is kicked off. Or 
someone switches to another window because something more important came up.

Kevin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]