View Full Version : Ring switcher plugin
maniac
March 26th, 2007, 11:06 AM
Hi,
here is my personal merge gift: A ring switcher plugin. :)
David indicated that he would prefer having the ring switcher in a separate plugin instead of merged into the normal switcher, so I decided to whip one up from scratch (well, not entirely from scratch as it's based on scale, but almost ;) ).
It's most likely not entirely complete yet, but it should work ok for now.
Please try and give feedback - it's invoked the same way as the normal switcher, it only uses <Super> instead of <Alt>.
EDIT: Because of the currently unclear merge situation most Beryl developers have decided not to provide ported or new plugins for the moment while still being working on the Compiz core. The latest public version can be found in mikedee's latest snapshot. We hope that we can resolve that discussions soon.
maniac
March 26th, 2007, 01:29 PM
Ok, just uploaded, already updated ;)
I've now also added support for switching to a minimized window (as usual, an icon is displayed). The link remains the same.
mikedee
March 26th, 2007, 01:48 PM
Thanks very much :)
Just a couple of problems though...
If I quickly switch it sticks on the ring, it looks like its missing a damageScreen somewhere because the windows return they are just not repainted. I think it happens if I release the button before the ring has formed.
Also since its a replacement for switcher, maybe you can use the standard alt+tab instead of the alternative super+tab
maniac
March 26th, 2007, 02:23 PM
Thanks very much :)
No problem - I hope it can help convincing you we are serious with a merge ;)
If I quickly switch it sticks on the ring, it looks like its missing a damageScreen somewhere because the windows return they are just not repainted. I think it happens if I release the button before the ring has formed.
I know there is a missing damageScreen somewhere, I just haven't been able to find it yet :(
Also, there sometimes is the problem that the animation switching out of the ring gets stuck. Maybe you can help me in finding this issue?
Also since its a replacement for switcher, maybe you can use the standard alt+tab instead of the alternative super+tab
Well, I had this discussion with quite a number of Beryl people when the ring switcher was first introduced. A relevant number of people wants to use both normal switcher and ring switcher (ring switcher being better suited for a larger number of windows; and the normal switcher being better for a smaller number of windows), hence the alternative key bindings.
EDIT: The damage problem is fixed. I uploaded a new version at the same location.
rememo
March 26th, 2007, 03:46 PM
This is an awesome plugin. IMHO better than the original switcher.
I'm assuming the text functionality doesn't work because we are missing the text-plugin?
Many thanks maniac, now I just can't stop switching :D
mikedee
March 26th, 2007, 03:59 PM
Yes, everything is working well now :)
Just a small feature request... It would be nice is the mouse pointer could be used whilst in switch mode. Apple does that with the normal switcher, but it seems to make more sense here because you can see all of the windows at once.
rememo
March 26th, 2007, 04:07 PM
It would be nice is the mouse pointer could be used whilst in switch mode
Hmm, seems more like scale to me then :) I just wanted to suggest to hide mouse cursor like in switcher :lol:
maniac
March 26th, 2007, 04:09 PM
This is an awesome plugin. IMHO better than the original switcher.
Thanks :)
I'm assuming the text functionality doesn't work because we are missing the text-plugin?
Yes, it's currently #ifdef'ed because the text plugin isn't commonly available. To fix it, include beryl-text.h in the source code and add a line #define USE_TEXT. It should would then - I'll upload a version which does this tomorrow.
Just a small feature request... It would be nice is the mouse pointer could be used whilst in switch mode. Apple does that with the normal switcher, but it seems to make more sense here because you can see all of the windows at once.
What do you mean by that? Never having owned a Mac I don't completely get what you're trying to achieve. ;)
maniac
March 26th, 2007, 04:11 PM
It would be nice is the mouse pointer could be used whilst in switch mode
Hmm, seems more like scale to me then :) I just wanted to suggest to hide mouse cursor like in switcher :lol:
Indeed, I should do that. ;)
Will fix it tomorrow.
rememo
March 26th, 2007, 04:59 PM
Yes, it's currently #ifdef'ed because the text plugin isn't commonly available. To fix it, include beryl-text.h in the source code and add a line #define USE_TEXT. It should would then - I'll upload a version which does this tomorrow.
Great, thanks :)
mikedee
March 26th, 2007, 05:38 PM
Just a small feature request... It would be nice is the mouse pointer could be used whilst in switch mode. Apple does that with the normal switcher, but it seems to make more sense here because you can see all of the windows at once.
What do you mean by that? Never having owned a Mac I don't completely get what you're trying to achieve. ;)
Alt - tab to initiate switcher, then click on the window you want rather than tabbing to it. It would be good because ring shows all of your windows.
The feature request to remove the mouse pointer kinda conflicts with this though ;)
iznogood
March 26th, 2007, 06:42 PM
The plugin is fantastic i really love it...
A couple of things though
First of all it does not work well with animation when it comes to unminimizing a window. I use magic lamp and the animation does not run with ring, it works with switcher though
Second, would it be possible to have the "active" window on the ring appear a bit brighter (or the others a bit more dark) ??? It would look better when there are many windows on the screen
Thanks
rememo
March 27th, 2007, 01:30 AM
Hi maniac,
I think I've found a little bug. In line 658 of the version you sended (decide about opacity of overlayed BIG icon) you probably didn't meant to use this
if (rs->iconOverlay == RingIconBig)
but this
if (w->texture->pixmap)
I could also provide a simple patch, to have an option to not scale minimized windows-icons. But maybe this isn't what we want, perhaps the icons could get loaded with max_scale*width|height so that we actually scale them down instead of up. (This is a trick I actually patched into kiba-dock, that originates from cairo-dock and was introduced by David into it, funny eh :) ) At least I thought this should somehow work with svg icon-themes, but after having played with getWindowIcon it doesn't seem to give me any icons greater than 96x96 :( (after digging a bit further this is because the data comes through the windows icon_property and depends on the app that sets it). Do you see any possible solution to load icons at a higher resolution (at least for svgs) to avoid the pixelation on scaling up? (feature request, ;) hint, hint)
maniac
March 27th, 2007, 07:13 AM
Hi maniac,
I think I've found a little bug. In line 658 of the version you sended (decide about opacity of overlayed BIG icon) you probably didn't meant to use this
if (rs->iconOverlay == RingIconBig)
but this
if (w->texture->pixmap)
Yes, you are right. Fixed in the new version I just uploaded ;)
Other changes:
- Text support is now enabled
- Mouse cursor is hidden
EDIT: Windows now can (optionally) be selected with the mouse as well :)
Another EDIT: I just noticed that the text isn't drawn correctly (it's produced by the text plugin, but not drawn on screen); I'll have a look into this ASAP.
I put the other suggestions (select window with mouse cursor, make the selected window stand out more) on my TODO list.
EDIT: The window selection with the mouse obviously now is removed from the TODO list ;) - You have to install the updated schema file and select the option select_with_mouse in order to be able to use it.
I could also provide a simple patch, to have an option to not scale minimized windows-icons. But maybe this isn't what we want,
Most likely ;)
Small icons among the larger windows won't look too good IMO.
perhaps the icons could get loaded with max_scale*width|height so that we actually scale them down instead of up. (This is a trick I actually patched into kiba-dock, that originates from cairo-dock and was introduced by David into it, funny eh :) ) At least I thought this should somehow work with svg icon-themes, but after having played with getWindowIcon it doesn't seem to give me any icons greater than 96x96 :( (after digging a bit further this is because the data comes through the windows icon_property and depends on the app that sets it). Do you see any possible solution to load icons at a higher resolution (at least for svgs) to avoid the pixelation on scaling up? (feature request, ;) hint, hint)
Well, if we could get the file path of those icons, we could pass it directly to the image loader. Is there a way to get this path? If yes, I'll put it on my mid-term TODO list as I guess it would be quite a bit of work.
First of all it does not work well with animation when it comes to unminimizing a window. I use magic lamp and the animation does not run with ring, it works with switcher though
Well, switcher doesn't use a "fly back" animation ;)
I'll have a look into this, but the conflict in kinda obvious: Two animations playing at the same time ... anyone with suggestions how to fix/avoid that?
Second, would it be possible to have the "active" window on the ring appear a bit brighter (or the others a bit more dark) ??? It would look better when there are many windows on the screen
Is changing the opacity of the other windows to ... say 80% enough?
rememo
March 27th, 2007, 01:22 PM
Many thanks for your latest additions. The select functionality was a good suggestion. This really is a great plugin.
Well, if we could get the file path of those icons, we could pass it directly to the image loader. Is there a way to get this path? If yes, I'll put it on my mid-term TODO list as I guess it would be quite a bit of work.
Hmm, I only know it for gtk (gtk_icon_theme_get_for_screen,gtk_icon_theme_look up_icon,gtk_icon_info_get_filename) and this is the problem: We would have to support kde and other DE's as well. So it seems there is no simple solution to this :( Or maybe there is a X-property of the window that has the path, but this is very unlikely.
nacho-m
April 6th, 2007, 09:14 PM
hi, new guy here...
about the mouse picking thingy, (haven't tryed the plugin yet so i might be sugesting thing that are allready implemented :S) maybe you could hide the pointer but as you move your mouse from one side to the other it triggers the tabbing, and with a click you select the highlighted window.
but hey, like i said above, i haven't installed the plugin yet so as far as i know it may allready work like this :P
nacho
ps: sorry about my english, it isn't my native language...
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.