Saturday, April 25, 2009

Untitled

Compiz is being ported to c++, and this (as well as the usual problem of time) has lead to a temporary postponement of work on jasper. To say that "it lead" is probably a bit deceptive, as I had not made commits for quite a while before the port was announced - but my intention is (in due time) to rewrite it (or, rather, write it again) in c++. Also, since compiz is now a reparenting wm, I have to look into how that affects the decorators. Hopefully, c++ will make it easier to do what I want (which I was having difficulty doing originally, which started the long period of no-commits)

In order to get better acquainted with c++, I started another plugin: tag. This is based, somewhat, off a feature request on the forums.

The idea is that the user can create a number of tags, and assign various tags to different windows. Each tag is either activated or deactivated, and a window with an active tag is considered active (the window with focus is also considered active). Non-active windows are drawn translucent, while active ones are drawn opaquely. Activating or deactivating a tag will restack the windows, so that active windows are sitting on top, while non-active windows are below - the original stacking order is maintained (apart from the active ones are pulled to the top).

There is a slight issue with this, in that it wouldn't work without patches to compiz's stacking code. Unfortunately, these patches haven't yet been committed to compiz, but if anyone is using master and wants to test them they are here (one and two).

There is still some things to do:
- Currently when you entering a tag, things don't work like they should if you press space or shift, etc. I need to copy some code from scalefilter to make this work properly.
- Currently, the only way to create tags, add/remove tags to/from windows, activate/deactivate tags, is by pressing a keybinding which grabs input and catches what you type (nicely displaying it on the screen at the same time). Ideally, you should be able to use Dbus, or add a specific keybinding to say, activate tag foo. The first should already be possible (except dbus isn't yet ported), and the second will need some reworking of the options code (which I hope to do, one day...)
- Let other plugins extend what tag does. For instance, another plugin could use the active status of a window (or whether it has a specific tag, etc) to decide whether it should be, for example, displayed in a scaled mode on the side of the screen, or as a normal window. On the other hand, other plugins should be able to influence the active state of the window (eg, if it is focused, some match rule things, etc)
- Automatically adding tags based on rules (eg, I could make a rule to tag firefox, xchat, pidgin as internet, and another rule to tag gnome-terminal and gedit as dev). At the moment all windows are just tagged with "default"
- Whatever I have forgotten
- Something about tiling?

I've also been accepted for Google Summer [or, rather, winter] of Code. Peter Hutterer will be my mentor, and I'll be working on getting input redirection in X :) So, if my work goes well, we will hopefully have IR next year.

Also, for those with ATi cards, dri2 is working almost very nicely :) Thanks to the work of Dave Airlie and Jerome Glisse (and others). Unfortunately, since I am using compiz master, I have no cube + glxgears to show-off, but it does work very beautifully in scale mode. [though, I don't think I really want to use the word beauty: "Don't use words too big for the subject. Don't say 'infinitely' when you mean 'very'; otherwise you'll have no word left when you want to talk about something really infinite." - C.S. Lewis]

9 comments:

Anonymous said...

Very nice to see that you are working on IR!

What is now the status of you work? Do you have working IR? A video?

Thanks for your work!

Joel Bosveld said...

Input transformation is working well (I needed a small patch to gtk to make gtk+ apps work correctly during drag and drop when the window is transformed - now I just need to see about getting something like that upstream)

Input redirection is somewhat working, but until it is working properly it is hard to test with other applications to see how they respond to it.

No video yet, apart from the videos I had last year (or this year, I can't remember) of input transformation. Once I get redirection working properly (and a nice demo), I'll put another video up.

Marco Diego said...

Hi!
GSoC is over. We're eager to hear news about IR!

Will it be merged anytime soon? What is X.org devs position on the topic?

Joel Bosveld said...

I was going over the wording of the protocol with Peter (my mentor during gsoc), but uni work has been keeping my time very constrained, so I haven't had any time recently to keep polishing it up.

I have yet to make a video, partly due to a problem with my demo not rendering correctly (the input redirection worked fine though) - and now I just don't have time (should be a bit quieter in a few weeks though).

Nerdopolis said...

Hi.
I'm sure we are all anticipating seeing your IR work in action! (I am) Have you got the chance to make a video of it yet?

PS: will KDE apps work with it? you mentioned a patch needed against GTK..

nerdopolis said...

...and I was wondering if a similar thing would be needed against QT.

Sorry about the two comments. I misworded the first one

Joel Bosveld said...

qt works fine with transformation, not with redirection (so needs a patch for that). gtk needs a patch for both.

(a slightly confusing point is that input redirection _usually_ refers to transformation, not redirection)

Haven't yet made a video... and I need to get my system back up and running properly before I can.

Nerdopolis said...

Hi

Did you have a chance to make a video of your IR/input transformation work?

I still want to see it in action, and I'm sure alot of people would like to see it in action.

Anonymous said...

Hi, I was wondering about the status of this project, but from what I see, it looks quite dead considering the last post was from more than 2 years ago. Maybe posting the source code somewhere on he compiz website could generate more interest? Right now there doesn't seem to be any good/up-to-date window decorator :/