Re: Window signals (signals in general)

On Tue, May 1, 2012 at 12:18 AM, Amy C <mathematical coffee gmail com> wrote:
> Hi all,
> Does anyone know if there's a signal emitted when a window changes
> state in the sense of "above"/"on all workspaces"? I can spot signals
> (in shell-wm.c) for maximize, minimize, unmaximize, map, destroy,
> switch workspace, etc but not for above/on all workspaces. Is this
> covered in something more generic like a "changed-state"-type signal?

The signals in shell-wm.c aren't meant for that purpose. You want the
signals on MetaWindow. In this case, you want to know when the "above"
property has changed, so connect to "notify::above".

> I'm writing an extension that just adds these menu items to the title
> bar (by the way - Google Chrome doesn't get a title bar from
> gnome-shell, possibly because by default it has 'Use System Title Bars
> and Borders' unchecked). I have a little toggle for above/on all
> workspaces and wanted to listen to the 'above'/'on all workspaces'
> signal so that if the user changes the window's status without using
> the menu (e.g. right-clicking on the title bar and using that menu
> instead), the menu can remain in sync.
> (It's no big deal if there isn't one - I'll just make sure that every
> time the menu is opened the above and on_all_workspaces properties are
> read and the widgets updated appropriately. It just seems more elegant
> to only do this on demand, i.e. when the relevant signal is raised).
> In general, how may I see what signals are available? At the moment I
> `grep g_signal_new *.c` in `gnome-shell/src` : is this sufficient to
> show all available ones?

grepping through the mutter source might also be fruitful. Note that
any property can also be checked for notifications (assuming the
application hooked it up properly), with a detailed notify signal,
like notify::above.

> cheers.
> _______________________________________________
> gnome-shell-list mailing list
> gnome-shell-list gnome org


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