PDA

View Full Version : More ideas for gtk-window-decorator


RYX
November 11th, 2006, 03:25 PM
Another idea that came to my mind when reading through the g-w-d-code is something I also requested for beryl: The decorator should offer a way to hook into the right-click-menu (for the top-bar) and add menu-items and assign compiz-actions to them. It would be another huge step for increasing usability.

A second idea is to extend the window-decorations to allow embedded windows/widgets - so some sort of hook/plugin that allows create little applet-like apps that can be put into the window-decorations. Or even better: drag&drop of windows into other window's decorations (so like "shared" decorations) - I find that even cooler than grouping because things are visually wrapped together.

Maybe these ideas are too extreme, but I think if we want to do something unique for compiz (compared to osx/vista), those would be a good starting point ...

:)

mikedee
November 11th, 2006, 06:00 PM
I think that these are good ideas.

Maybe we could implement mouse gestures on the window border, eg. right click + drag up could shade the window, right click plus drag right could throw the window right. Maybe this could be a plugin idea though?

I once wrote a script which changed the colour of the title depending on the cpu load, it was actually quite useful. Maybe this could be hard coded in, but it could also be a seperate app which changes settings and then reloads the decorator (My script did that).

The group plugin could be extended so that the window decorator could communicate with it, this would be very good because the key bindings are all too much to remember (for me anyway)

RYX
November 12th, 2006, 01:38 AM
After looking some deeper into the code, I realized that the first idea needs some significant changes. The libwnck does NOT offer any way to add additional menu entries to the window-menu, so it would make sense to either create a gtk-menu (or qt as optional build-flag?) and entirely use compiz-actions (sent as WM-messages or via dbus) to realize the menu-functionality or create a totally owner-drawn menu. Either way we could create some config-file (or keys in gconf but I'd prefer XML-files also for compiz itself) where the user can define a menu-structure and connect the entries to the compiz-actions ... that would be _very- cool ...

@mikedee: yes - the group plugin could do interesting stuff if connected to the decorator. Maybe the decorator could offer some simple plugin-interface to allow even cooler things than we thought of yet ... (maybe only some "one-way" interface without static linking to the decorator).

RYX
November 14th, 2006, 01:27 PM
I had another nice idea - the decorator should allow shading windows to any side, not only to the top. So if I have a big-border theme and double-click the right border, the window should shade to the right and only leave the right border visible. Same for the left and bottom ... it would look cool and be very useful, too. And I think it could be well integrated using a plugin-like architecture in the decorator ...

Mikedee, the mousegestures should maybe become their own compiz-plugin (or maybe a seperate application?) - but I still love the idea ...

:)

RYX
November 14th, 2006, 02:31 PM
Another thing I found very interesting is that the switcher seems to be entirely drawn by the decorator - I initially thought it would be drawn by the decoration-plugin. So it looks like the switcher could also be themed/styled in any way imaginable ... I like the idea of having a somehow non-linear look of the switcher (like the compiz-logo as switcher), maybe it works to use the XShape-extension to shape/draw it using some bitmap/svg and have a more themeable and cool-looking switcher ... or maybe without shape? (when switcher is active, we have no input anyway) ...

That leads to the thought if other windows could be treated the same way, to implement a new window-type which then gets explicitly decorated in a certain way (like dialogs/toolwindows/...) ...

Just some more thoughts.

:)

RYX
November 20th, 2006, 03:19 AM
To continue this monologue:

- the user-definable rightclick-menu (via menu-plugin) should enable the user to set window-related compiz- and decorator-settings and launch shell-commands via menu-items

- rightclick-menu should contain a properties-dialog (only one - always displaying props for the active window), also implemented as plugin, that allows to manually resize windows (essential for many web-developers) and set other window-properties via a typical "Properties..."-dialog

- rightclick-menu should offer a way to configure plugins - e.g. the "state"-plugin to perform certain actions for certain windows/apps (e.g. a menu-item "Advanced -> State -> Set Default Position ..." should popup a dialog for setting/adding the certain value in gconf)

I hope you understand what I mean, because it is late and I am very tired (and miss the keys while typing) ... sorry for partly repeating myself ...

Good night everybody!

:)

RYX
November 21st, 2006, 03:51 PM
Another simple idea: "Pick-up-and-drop"-effect ... could be easily done by simply increasing shadow-radius and blur-factor whenever a window gets dragged. That way it would look like the window is picked up and dropped at its destination ...

Maybe this would be better to be part of a shadow-plugin for compiz (imho one of the most needed plugins) instead of doing it within the decorator ... otherwise dragging windows with <Alt>+Mouseclick would not cause the "pick-up-and-drop"-effect ...

:)

mikedee
November 21st, 2006, 04:46 PM
Just in case you haven't seen it, there is a post here (with lots of follow up) about the window decorator and shadows. The general consensus at the time is that proper shadows would be slower than blur :)

http://lists.freedesktop.org/archives/compiz/2006-April/000009.html

mikedee
November 21st, 2006, 04:49 PM
I think the ideas of extra controls and configuration on the window borders is natural but if there are too many buttons and switches it can look cluttered. Maybe we could have slide out panels attached to the window which could slide out when you want to change a window specific setting?

RYX
November 21st, 2006, 05:05 PM
Thanks for the link, mikedee. I was really looking for that information about the decorator (but was too lazy to read the whole list and too stupid to use the search ;-) ..).

And I like your idea of slide-out-panels, (though I didn't mean adding extra-buttons to the window - in fact I'd prefer button- and title-less windows with a small popup with title/icon/info (and maybe settings-menu?)) ...

:)

RYX
November 21st, 2006, 11:52 PM
After reading through the whole discussion, I'm glad to see that David's intentional thoughts about plugins are basically what I had in mind. It gives me a little motivation to continue working on the decorator. And I now understand why there is no shadow-plugin, (though I don't really know why everyone thinks that _only_ blurred shadows using convolution filters are acceptable - I'd be happy with sharp edges).

:)

Vasek
January 5th, 2007, 08:10 PM
Hello,

I think it would look good if the shadows were painted at the very background, under all windows, so that two neighboring windows wouldn't drop shadows on each other when switched between. I tried hard to understand the code of gtk-window-decorator and decoration plugin, but I am not a good programmer so I didn't manage to. Would such a feature be hard to make?