Re: Idea

>What about adding following feature to gnome...
> if you click with the right mouse button onto the icon of a window
> in the tasklist, a popupmenu will apear with features like 
> close app, kill app,....

I think the old pager already did this? (At least I think it had close 
window, kill app's X connection.)

> Now what about allowing an application to add own entries to this
> popup menus, thus it is possible to use gtcd (cd player) without 
> displaying it on the desktop.
> then gtcd can make entries like "next title",....

Panel applets provide this possibility. I think it would be difficult to 
add a similar capability to the tasklist, because the tasklist would have to 
contact the app and ask for the contents of a menu when it received a right 
click, then contact the app again if a menu item was selected...

I guess you could use CORBA for this (the tasklist has an interface for 
registering listeners, the app registers itself as a listener, the listener 
interface includes the functions char ** get_menu_contents () and void 
menu_item_selected (int index)).

I don't fancy coding it though (what if a listener dies, what if no tasklist 
can be found, etc?). And all of that has to be filtered through some kind of 
X property --> PID lookup, because the tasklist only knows the X window ID 
and the tasklist will (presumably?) need the process ID or some other unique 
application ID in order to contact the correct listener.

In fact, it might be neater to use X properties/client messages for 
everything. The app would set a property on its top-level window which was an
array of strings (the menu contents), plus maybe some flags to indicate
whether menu items should be highlighted or insensitive. You could even
attach icons. The tasklist (or pager, window manager or whoever else wanted 
to display the menu) would read this property and build a menu out of it in 
its own unique graphical style. When a menu item was selected, the 
pager/tasklist/window manager would send a client message to the app 
identifying the selected item.

Of course you would want to hide this inside the toolkit, so the application
programmer would just create a gnome_window_menu and attach callbacks to the 
menu items.

Any thoughts? Would this work?


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