Tuesday, August 21, 2007

SoC progress report: August 20, 2007

Hello!

Since this is the last SoC progress report, I've decided to make a not-so-small text explaining the current state of my project. If you don't want to read it, skip to the end, there is a smaller version there.

  • Toolkit (gtk+) issues:
    • Getting the events:
      • Works with my patch, but not the way I want. I don't like using strcmp() everytime I get an event to discover which device generated it. Also, I should review my patch before submitting to the gtk+ guys.
    • Menu Widget:
      • Stopped working on it. Things recently changed in MPX, and we're also having a problem with grabs. I've talked to Peter Hutterer (who is responsible for MPX) and this problem is still to be solved in MPX, so I decided to wait.

  • Coldplugging:
    • Works.
      • There are issues when there are more mice than keyboards, but they're not bugs, just doubts about how should metacity behave.
  • Hotplugging:
    • Not implemented.
      • Hotplugging doesn't seem to be working for me with MPX (I think I'm doing something wrong). But assuming that MPX works correctly, it should be easy to implement.
  • ClientPointer changing:
    • Works.
  • Device pairing:
    • The internal part works (metacity recognizes and works correctly with pairs).
      • I'm not happy with the way it is working when there is more than one keyboard associated with a mouse. I'll change this.
    • Letting the client change the pairs wasn't implemented yet, but this is also easy.
  • Access control lists managing:
    • Works.
  • Xi events:
    • Works: we're completelly using Xi events.
      • There is a problem getting events when clients do implicit grabs. This is the same problem I described in "Menu Widget"
  • Multiple focus:
    • Works.
      • I'm not happy with the way it works when there are more keyboards than pointers. I'll change this.
      • There is the implicit grab problem mentioned two times already, and because of it, you can only change focus using the window frame for applications that do implicit grabs on the mouse.
  • Multiple window operations (dragging/resizing, etc):
    • Being implemented.
      • I have a patch in my local branch and I'm fixing the bugs before committing I was planning to commit this before SoC final timeline, but things got bigger than I thought.
  • The WM menu:
    • Explained already: having problems with implicit grabs. (And I also found a bug today, which will be fixed in the next commit, along with the multiple operation stuff).
  • The code itself:
    • Even if it works, I'm not happy with some function prototypes, variable names and the way I broke metacity's layers. This will be changed (takes time...).
    • Still need to remove the "--enable-mpx" and make it the only possible option.
  • The guide to other WM maintainers:
    • Works: doing the final adjusts. It is already at http://www.inf.ufpr.br/prz05/mpx_wm.pdf , and as I change it I'll update the link. Thanks to Elijah for the great help on this document!
  • Other documentation:
    • Works. See http://live.gnome.org/Metacity/Mpx. Will probably put parts of this text there.

So, in summary:
  • Toolkit:
    • Events: works.
    • Menu: has problems.
  • Coldplugging:
    • Works.
  • Hotplugging:
    • Not implemented.
  • ClientPointer changing:
    • Works.
  • Device pairing:
    • Internal parts: works.
    • User interface: not implemented.
  • Access Control Lists:
    • Works.
  • Xi Events:
    • Works.
  • Multiple focus:
    • Works.
  • Multiple operations:
    • Being implemented.
  • The WM menu:
    • Has problems.
  • Guide to other WM maintainers:
    • Works.
  • How-to:
    • Works.
But there are a lot of things that work but I'm not happy with the way it is working, and so will be changed. And, of course, there are also hidden bugs!

So, what's the plan now?
I'll keep developing the project until I implement everything, then I'll start maintaining it and see what happens when people start using X.org 7.4. I'll also try to help with the other stuff that need MPX integration: the toolkit and the panel.

My thoughts about SoC and GNOME:
Thank you very much for everything!! I really enjoyed being one of the GNOME's summer of code students! Now I know a lot more about the GNOME community and I'll try help it become even better. Thank you very much!

And, of course, I'd like to send some special thaks to my mentor, Elijah Newren!

Cheers,
Paulo.

Tuesday, August 14, 2007

SoC progress report: August 14, 2007

Hello!

As I predicted last week, my "svn diff | wc -l" is now 3000 lines bigger (it outputs "7866").

The part of the code that deals with input was completely restructured so now it uses XInput events instead of core events. We can now do things like move/resize windows using any mouse (not only Metacity's ClientPointer). We also have multiple focus working now.

What still doesn't work:
Moving/resizing multiple windows at the same time.
Window borders and titles that doesn't confuse users (correctly indicating the window's focused devices).
Minor undetected bugs?

About the menu widget: MPX changed a little bit the way it deals with passive core grabs and I didn't have time to recompile/test it until today. I'm now recompiling it and I'm gonna test after. There is a chance that gtk's menu widget will now work without any patches.

About code commiting: my patch got way bigger, and I didn't have time to completely review it. I'm not happy with some variable namings and function prototypes, and I don't want to commit the code as it is. If you want to try it, tell me so I can send you the patch with the non-reviewed code. I really wished I could have split it in smaller parts, but it wasn't possible. Sorry...

Task order this week:
1 - Correct window borders
2 - Allow multiple operations at the same time
3 - Make menu widget work for any device that clicks it (if needed!).
4 - Review/commit the patch(...).

Cheers,
Paulo.

Tuesday, August 7, 2007

SoC progress report: August 07, 2007

Hi!

This week I've made a lot of progress. I'm currently implementing multiple focus and correct (not multiple yet) window moving/resizing. My "svn diff | wc -l" increased in almost 3000 lines and I think it will increase more 3000 before I commit stuff.
Also, in my proposal I said that I was gonna write a document for other window manager maintainers that would show them what they need to change to integrate their window managers with MPX. I started writing this document but it is not finished yet.

There's not too much to say: I need to go back and code more...

Thanks,
Paulo.

Tuesday, July 31, 2007

SoC progress report: July 31, 2007

Hello!

This week I came back home and started to work on my project again. I'm still working on the same stuff (gtk's menu widget, multiple focus, multiple window dragging/resizing). My gtk patch has increased a little bit and I'm starting to have a few new ideas about how to integrate gtk with MPX without breaking everything, but this integration will not be done as my summer of code project: the only gtk patches that I will write will be the patches that allow metacity to work correctly. After SoC we'll think about that =)

Thanks,
Paulo.

Tuesday, July 17, 2007

SoC progress report: July 17, 2007

Hi!

Since my last report I've only developed a little bit, because I went to GUADEC and I don't have a laptop to keep developing here. I'm still at GUADEC and it is just GREAT!!! Except for the fact that I still don't have my luggage... Thank you so much for giving us this opportunity! I'm really enjoying it!

When I get back to Brazil I'll continue the development.

Thanks!
Paulo.

Thursday, July 12, 2007

Going to GUADEC!

I'm going to GUADEC, so there will be no SoC progress report for a few days.

Thanks a lot for the opportunity!

Paulo.

Tuesday, July 10, 2007

SoC progress report: July 09, 2007

This week I've created my metacity branch called 'multiple_pointer_x' [0].

Spent a lot of time adjusting my "local patches" to something not-that-ugly and committed the first part, which creates the infrastructure for compiling the branch (will have to be done with --enable-mpx) and also enables the user to change the application's client pointer.

I've also created a page for the project [1] and added a howto [2] that teaches how to compile and install mpx and the metacity.

I also spent some time doing patches in MPX [3][4][5] that correct a few variable types in .h files, so I won't need to do type casts all the time.

Today I've also committed the second part (which needed this MPX patch to work). It corrects the RadioButtons (that were not working) and adds the option to enable/disable device access to specific windows.

One of the things I plan to commit this week will be (part of) the metacity "real" interaction with multiple devices, and one of the problems involving this is how should menus interact with multiple devices. I wrote a little text and plan to post on my blog, so I can read everyone's opinions about it.

Problems I ran into:
- I really thought cleaning my already-done code would take less time =) 50% of the added lines contained XXXs...

Cheers,
Paulo.

[0] http://svn.gnome.org/svn/metacity/branches/multiple_pointer_x/
[1] http://live.gnome.org/Metacity/Mpx
[2] http://live.gnome.org/Metacity/MpxHowto
[3] http://lists.freedesktop.org/archives/xorg-commit/2007-July/011811.html
[4] http://lists.freedesktop.org/archives/xorg-commit/2007-July/011810.html (only one of the commits!)
[5] http://lists.freedesktop.org/archives/xorg-commit/2007-July/011809.html

Tuesday, July 3, 2007

SoC progress report: July 03, 2007

Hi!

This week I've played with a lot of stuff, and reached a state where my "patch" was so big that I lost control over it. Before continuing, I'll commit patches to the newly-created metacity branch called 'multiple_pointer_x'. I've already created the branch, and I'm almost ready to commit the first part, but I'm having a little problem (bug) so I'll wait until tomorrow.

While playing, I also had to make a little modification in gdk. I've created a little gtk+ patch, but it will only be needed when I commit the multiple foci stuff. I'll probably have to make this patch bigger as I develop more stuff. If someone wants to see it, just take a look at [0].

I've also created a howto that teaches how to download and compile mpx, gtk+ and metacity. The howto will be available in my project page, which wasn't created yet. I plan to create it tomorrow too (after the commit).

This week, I plan to commit the changes I did in an "organized way", so I can continue developing without breaking the stuff I already did. I'll also create the project page and the howto, so everyone will be able to use my branch.

Thanks,
Paulo.

[0] http://www.inf.ufpr.br/prz05/gtkPatch.patch

Tuesday, June 26, 2007

SoC progress report: June 25, 2007

Hi!

First of all, sorry for not reporting my report last week. It was the most important week at the university, and I had a lot of stuff to do. Now I only got 2 tests reamaining, one tomorrow and one after tomorrow. After Thursday there will be nothing more to stop me =)

On the last 2 weeks I've almost stopped developing, and now I'm back. Since I started again, I spent my time trying to solve a problem with MPX, because without that I wouldn't be able to continue testing my patches. While I was writing this text Peter gave me a solution to the
problem. Nice!

This week I plan to keep testing and see what happens...

I know I'm a little bit late with my project, but don't worry, from now it's going go faster!

Cheers,
Paulo.

Tuesday, June 12, 2007

SoC progress report: June 12, 2007

Hi!

This week I started implementing the multiple foci stuff. I thought I was going to finish it this week, but I found a few problems I was not expecting, so I didn't finish it.

The problems were:
I was sure I was going to use Xlib-only, but then I saw I had to use gdk. Spent a lot more time than expected trying to understand metacity's source code, and also spent a little time learning gdk XInput functions. Something that I noted is that these gdk XInput functions will really have to be changed if gnome applications want to deal with MPX. Since this is not my SoC proposal, I'm not planning to do this so soon. Maybe after SoC? (or maybe when I realize I will need it...).

Another problem was a little bug in MPX, which I tried to solve/workaround but had only partial success. I already reported it, so maybe soon we'll have that part fixed.

So, what has changed? Well, now metacity knows which pointer is clicking its frames. Now all we need to do is to send the correct DeviceFocus and keep structures in the code to know which keyboard is focusing which window.

As I already said, after I implement the multiple foci, I'll create a metacity branch and start adding code there (my local patches are reeealy ugly).

Cheers,
Paulo!

Tuesday, June 5, 2007

SoC progress report: June 05, 2007

First of all, sorry for the delay.

This week I studied. Studied about my SoC project and also University stuff. Things are getting hard here... What I studied was how to implement the multiple foci. I had a few chats with Elijah (my mentor) and with Peter (from MPX), and now I think I finally "get it". Just gotta do some final tests to fully understand behavior of things, and then implement stuff!

I was already expecting to have difficulty/no time at this part, so everything is still under control. This week we have a holiday on Wednesday and Friday, so I will have time.

Once I get the multiple foci part implemented, I'll create a branch at metacity's repository and then commit stuff for everyone!

Cheers.

Monday, May 28, 2007

SoC progress report: May 28, 2007

Last week I did nothing because of the University, and this week I did just a little bit... Next week I'm planing to go back to the "normal" state.

Well, this week I've thought about how to implement a lot of things but implemented almost none of them. I've finished the XSetClientPointer part andcreated the infrastructure for the XChangePointerKeyboardPairing and XPermitDevices/XDenyDevices. Now I plan to finally start working with multiple foci (that's going to be hard...).

I've made a little video [0] for those who don't have any idea of what I'm talking about =). The problem is that recordMyDesktop doesn't have support for multiple mice, so you'll have to use your imagination =).

[0] http://www.inf.ufpr.br/prz05/video1.html

Cheers!
Paulo.

Monday, May 21, 2007

SoC progress report: May 21, 2007

SoC progress report: May 21, 2007.

This week I've been busy with university stuff. I have a lot of stuff to do, since this is the end of the semester, so I couldn't work on SoC. I really don't have time, so I wont spend it writing a big text just to say that I did nothing =). I'm sorry...

Cheers,
Paulo.

Monday, May 14, 2007

SoC progress report: May 14, 2007

I've decided that I'll start coding and "learn things on demand".

This week I've looking at metacity's code and tried to add the necessary infrastructure for the MPX support. Metacity now knows about our input devices, so we can start implementing the MPX calls.

The first feature that I added was the XSetClientPointer(). which allows an application to change its current "core pointer". Let me explain: when an application calls, for example, XGrabPointer(), it tells X to "grab the pointer", but it doesn't tell which pointer is going to be grabbed (because when XGrabPointer() was created, they assumed that there was going to be just one pointer). So now we can tell which pointer is going to be the client's pointer.

To implement this I had to understand metacity better, and also learn a little more about GTK. Thanks to my mentor, who answered a lot of questions!

One problem is that I couldn't test the feature because of a bug in MPX (which was already fixed but not committed), so I'm going to wait a little bit more.

There is also another problem: who is going to be metacity's pointer? When we pop a menu, the pointer that is not the client pointer has some difficulty in using the menu because the application grab "its" pointer and not the others. I'll have to study this a little bit more... We can use the Xi protocol calls here, so we won't need to set a ClientPointer for metacity, but I think I'll have to talk to someone who understands gtk implementation before... This is not a big problem, I'll probably think about this after everything else is done.

This week, I'll study the problems I reported and I'll also start studying how multiple foci works in MPX.

See you next week!
Paulo.

Monday, May 7, 2007

SoC progress report: May 07, 2007

From the beginning to now , I've read some documents about window managing, a window manager example, and I still need to read two big and boring documents about X client communication (but I already know what they are talking about).

Also, I've been looking at metacity's source code, trying to find out which part does what, and I've done modifications like "adding a menu that does nothing", because this kind of changes will be needed (that means I also started learning gtk).

I've talked with my mentor, Elijah Newren, asked him some questions, and he showed me the way about where and how to insert the modifications I plan to do.

I've been doing some test programs that use the new MPX Xlib calls to test the behavior of the new functions (more specifically: changing a client's pointer and discovering the devices and their types from the xserver). I've found a little bug but Peter Hutterer (from MPX) said that he had already detected and corrected it, but not commited, so there's no problem.

Also, I've spent some time creating a website and a blog, because I've always postponed the creation of both.

Problems? Well, I've been studying and testing stuff, so there are still no big problems, but I guess they will show up soon... The biggest problem is the university. I think I'm going to take a full week to write all the applications that teachers are asking us, then I will only need to care about the tests in the end of the semester (but they don't take as much time as the other stuff).

By the way, I really don't know in English how do you "name" those applications that teachers ask for students to write, and if they don't, they get less grade. Any clues? We call them "trabalhos" (jobs?) in Portuguese...

See you next week!