Tue, 15 Aug 2006

Seventh report

Screenshot with web page relations

Web page relations.

After too much procrastination, I have something to report for a change. The Compiz plugin and the Firefox extension are fleshed out to the extent that curious and helpful people might want to alpha-test them. I don't have precompiled binaries or even source packages yet, but compiling shouldn't be laborous (see InstallationGuide in the wiki).

Otherwise, I needed to merge upstream changes of Compiz to the plugin, which meant getting more experience with Git. Some is still pending, as the documentation work isn't properly merged yet. Comparisons of version control systems seldom extend on the different work-flows they imply. The closest this far and thus useful reading was What people Love about their VCS - Part 3 of 4. git, which a friend pointed to me.

Something historical I hope someone would've reminded me of earlier when I told of my debugging setup is core dumps. They're off by default these days, but tell ulimit -c unlimited to bash before running a program, and you can start the debugger after the crash. This is good for big processes such as Xgl or Firefox, but it also removes the need of remote debugging in case of Compiz. Just start Compiz again, and examine the core file with gdb ~/inst/bin/compiz core.

While I'd like to think there's still a month left of the summer, there's actually less than three weeks. I don't expect to get the project fully closed down the last day of the month anymore. Luckily the semester starts slowly in the Finnish universities, so I'll have time to finish documentation and revise patches. But before that, I need to achieve a couple of major sprints. I'd almost hope the summer weather of the century to turn into focusing autumn rains. I'll try to add more features to the Firefox extension, and make the Compiz plugin look acceptable if not good.

Posted at: 07:46 | Permanent link | Comment page

Fri, 21 Jul 2006

Sixth report

I don't have much to report since last week. The Firefox extension start is just about ready for publishing but the Makefile for compiling it won't be pretty and there is not much to see when you install it. I'm contemplating whether to add some kind of user interface to the extension, or if it's acceptable that the only way to see the operation is via the Compiz plugin or debug tools (xprop).

Actually, I got distracted, and hacked the "documents" interface of Gimmie to show the data from the extension. Unfortunately, based on my earlier experiments and the PyGTK documentation, I thought I could get notifications for window property changes, but I seem to be able to get them only as GDK_NOTHINGs. Probably a PyGTK thing, I should ask around.

That's about it. I also followed the discussions on the Compiz mailing list, and updated the project wiki pages on the development environment and on checking out my code, following the transition to Git. I know a demo release of code would be more anticipated.

Posted at: 16:23 | Permanent link | Comment page

Fri, 14 Jul 2006

Fifth report

During the past week I completed the communication path from a Firefox extension to the Compiz plugin and visualizing the results. It was about time as the summer is half-way through, and there's still a lot of extending and polishing left to do. I want to publish a demo version of the extension soon along a version of the plugin code that works with it.

After my last report, it turned out getting the native window was not as easy as it seemed. Even though nsIBaseWindow has it as a property, there's some code for accessing it, and trying to access the property makes the code give you a ... segfault. Luckily the code could be worked around by using GetMainWidget and GetNativeData(NS_NATIVE_WIDGET). The native code now does all I need, and the JavaScript part uses it to publish the address and title of the document. I'll need to explore the JavaScript side more to get the information about parent window, that is, which page was this page opened from. Another thing is supporting a set of documents, as tabs lead to several documents per window.

A bit unexpectedly, the Compiz upstream changed to use Git instead of CVS. I welcome the use of distributed version control, but it means my CVS to Darcs gateway of the Compiz repository makes no sense anymore. I've been learning Git, setting services up, and moving my Compiz patches to Git. This far, you can browse the new repo git://tuukka.iki.fi/compiz.

I've hit some problems on the Compiz side, not understanding some details of the system. To help this, I've continued studying the code and adding comments and documentation. Some of this is currently available in the documentation_work head of my Git repository, specifically the patch. I'm planning on going through all of the paint sequence next, as that's one of the most delicate ones to understand.

To try more OpenGL features I wanted a Python environment that is similar to Compiz. It's not too near yet, but it has pixel coordinates set up, and I was able to debug my arrow drawing mathematics with it.

Posted at: 16:56 | Permanent link | Comment page

Fri, 07 Jul 2006

Report 4

The passing week I've read up on the fundamentals of digital compositing as told by A. R. Smith himself. The series of memos he wrote at Microsoft to share his previous experiences and history were a good read. Even though I'm not working on the technical level of producing the illusion of translucency and sprites, it's good to know the theory, and concepts such as design space versus display space. I like recording the historical pieces in Wikipedia where they will hopefully last.

Regarding the Firefox extension, I have written down something general on the topic of extending Firefox. The result of my tests this far is the Hello world! extension combined with this important result of Googling:

var basewindow = window
    .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
    .getInterface(Components.interfaces.nsIWebNavigation)
    .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
    .treeOwner
    .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
    .getInterface(Components.interfaces.nsIBaseWindow);

After that beautiful piece of Javascript using XPCOM, basewindow is a reference to nsIBaseWindow, which I can use to move the top-level window with basewindow.setPosition(400,300); Totally useless, except that when I go over to C++, the same reference can give me the platform-specific native window, which seems to be in the form of GdkWindow *. It should be easy to set window properties from the extension, on the window, for the Compiz plugin. We'll see just how easy.

Posted at: 16:06 | Permanent link | Comment page

Third report - first month past

The first month and a third of the total work is past now. It has been mostly like I expected: learning to hack a new project, studying its composition, and making tests to verify understanding. I have been obsessed with the Compiz code so that I did not look at Firefox extensions yet. The month has also reminded me that many people are against anything new.

The previous week went into more work with the Compiz plugin. I learned how to draw anti-aliased lines in OpenGL, implemented some communication code, fixed a bug in sloppy focus in scale and keyboard navigation in whirl. With respect to project milestones, I'm now able to composite windows of one app next to one another, and employ (fake) metadata. I haven't published this code yet. Compiz at freedesktop.org has been moved from CVS over to Git, and I should do the same for my Darcs repository.

The preliminary list of use cases for the plugin is in the wiki, and the line-drawing was a test for rendering connections between windows. One wild idea is using a window as a texture for connections, but I don't have a good way to implement connections in OpenGL yet.

I was thinking that there are several Firefox extensions that can template the needed extension. Gnowsis has one, Beagle has one, and Gimmie is going to have one. Actually it seems like they don't deal with tabs yet, though. I'll first look into these previous implementations and after that try to see whether Firefox has interfaces suitable for other kinds of implementations.

Posted at: 00:36 | Permanent link | Comment page

Thu, 22 Jun 2006

Second report

Prototype screenshot

The plugin prototype.

During the last ten days, I've familiarized myself with most of the Compiz codebase, created documentation about Compiz and my project in the wiki, as well as implemented the user interface prototype as planned. I've also got some new ideas about Compiz and how my work relates to other projects. I've learned that Gimmie's plan contains an item on getting from the applications the resources that are visible in a window: sounds like a case for metadata to me! Bubbles is an example of what kind of things you can do with integration where it's possible: I want to widen that scope.

It took me a while to get over some segmentation faults I was getting in my version of Compiz and stop wasting time in them (twenty hours I would say). First, window manager is awfully complicated software because it has to do something sane in all the exceptional cases. Second, programs in C you need to run in a debugger, even if it should take another computer. Third, cp isn't enough when you re-compile, re-install, and re-start software, because it actually changes the target file instead of creating a new one, which in case of so plugin files leads into... segfaults in the previously running program.

So more wikipages is better. More blog posts would be better too. Also more version control repositories is good. It's so easy with current tools. I now run tailor to distribute the Compiz CVS in Darcs, with and without my patches. I made some private repositories too, such as for these blog entries. There's even a web interface to the public repositories on the project site now.

That's about it for now. I heard from David, he's busy but promised to look closer into my project later. I should communicate with freedesktop.org people too, asking for anybody interested in specifying a general X window metadata communications protocol, and decide about the common interests with Gimmie. I already sent a message to the Compiz mailing list about the documentation work. Of the six bullet points in this months' schedule, the one I haven't touched yet is Firefox extensions, so that's also something to expect from next week.

Posted at: 22:00 | Permanent link | Comment page

Mon, 12 Jun 2006

First report

During the last eleven days I have started the project, set up a suitable development environment, prototyped a trivial communications mechanism, had a closer look at Compiz code, and created a stub Compiz plugin. Nothing earth-shaking, but I'm within the schedule and it has been good to lay proper foundations, think things through etc. Now I've got more concrete ideas on how to proceed on the development process.

I'm following several related communication channels:

This takes about an hour a day. I wonder what I'm still missing. The third-party community also has web forums and a wiki, but I hope I hear about the developments on the mailing list or on the blog.

I used about six hours to set up my web server and wiki. On the other hand, I've put over 10 hours to install, understand and configure pyblosxom for this blog, and I'm not satisfied with it: web design is not my specialty, and I would've wanted commenting and wiki markup plugins to work. The default installation is incomplete, documentation is lacking, there are no (up-to-date) deployment examples... But I hope you can read this and leave comments, so I can forget this for now.

Some of my experiences and plans are already available in the wiki. I should write more about how to create a new Compiz plugin, and about this project in general.

I looked at the differences in the scale plugin between the offical version and the third-party community version. I think I'll start my plugin as a copy of the current official version: change layout to have the focused window big in the middle, add some criterion for "relatedness", make clicking re-layout instead of exiting the mode. This should be most of the user interface for starters.

I haven't found good documentation on the ideas of the model in the X Window System: windows and their properties. I made a trivial prototype of a communications system ( property_listener.py and property_notifier.py) mostly to gain some understanding on what I could try to understand. I'll try to get some comments from the experienced X hackers.

Posted at: 02:47 | Permanent link | Comment page

Wed, 07 Jun 2006

Project start

My project has had a slow start. Apart from preparing the application and presenting it to the Summer Code Finland jury, I decided to postpone the project to the summer months, in favour of my studies. I contacted some people such as David Reveman though and had discussions about the plans. I also had to follow the developments around X.org, Xgl, Compiz, Kororaa live-cd, Dapper live-cd etc. I've been able to compile and run the whole Compiz stack on my Debian Sarge laptop in jhbuild, but never with proper-looking output. We'll see if I'm able to return to Debian Sarge during the summer or if it all will be life on the bleeding edge.

In May, I travelled to DebConf6 to meet a lot of fellows and to get a motivating vacation in Mexico. I got to see the X Window System hackers Jim Gettys and Keith Packard, and Keith gave the good advice to try make a great demo :-) He also told the input redirection is not going to be here yet — luckily I don't really need it, this just means that for the moment windows can't accept input while my plugin is active (same goes for example to the Exposé-lookalike plugin called Scale).

After the great trip, returning to Finland wasn't easy at all (and I've read in Planet Debian that it certainly wasn't difficult just for me. The week I had reserved for project preparations was hardly enough for the jet lag! I managed to find and select a nice virtual server provider for the hosting though. A small project like mine wouldn't necessarily need a server, but being used to a modern development environment with distributed version control and having bad experience about the performance and reliability of project hosting sites, I opted for my own server that I can configure to skip all the extra hoops.

Posted at: 17:41 | Permanent link | Comment page

Welcome!

I'm going to blog here about Semantic window compositing, a free-software project that I got accepted into the Summer Code Finland program (in Finnish; Kesäkoodi). I'm implementing a Compiz plugin that shows related windows together, based on relationship information gathered from applications, including a Firefox extension.

I'm glad I got accepted, because I don't think anyone else would try this soon otherwise: it's too low-level for Semantic Web researchers and too much academic nonsense for the free software community. I hope to prove by code that the idea makes sense!

I finally have this blog working (pyblosxom, still don't have commenting...). I also have a wiki and Darcs version-control repositories for code set up.

I appreciate any comments, you can leave them in the wiki at VisitorComments or send by email to Tuukka.Hastrup@iki.fi.

Posted at: 16:27 | Permanent link | Comment page


CC Some rights reserved

These weblog entries are licensed under a Creative Commons Attribution-ShareAlike 2.5 License