On 02/06/2011 02:53 PM, Thomas Perl wrote:
Hi Alberto,

2011/2/6 Alberto Mardegan<ma...@users.sourceforge.net>:
What do you think about all this? I didn't check hildon-desktop and mb2
source code yet, so if you also happen to have some hints on the
implementation, they are very welcome. :-)

Sounds good. Hildon-Desktop already sets the auto-rotation flag on a
window if Ctrl+Shift+R is pressed. There is a central place in H-D
where these keyboard shortcuts are handled. Going from there, you can
see how the setting of a flag is done (for the current window). It
shouldn't be too hard to add support for doing this by window title or
window class.

Oh, I didn't know about that! Then some of the hard work is already done. Thanks for the tip! :-) Then what is left to do is to find a way to serialize the window description, store it somewhere and then read it back when a window is shown.

About describing the windows, I had a quick look at libmatchbox2, and it looks like the MBWMClientWindow has a few interesting fields:
- pid_t: we could look up the process name.
- name: I suppose this is the window title
- hildon_stacking_layer: I don't think that this is constant, but we might be able to use it somehow

So, <process-name>[/<window-title>[/<stack-order>]] might be used as a key to match windows in the configuration file.
(all this is supposing that the fields above work as I expect :-) )

I wonder what would happen if we would simply try to
patch H-D to auto-rotate every window and then "blacklist" the
closed-source apps that don't work?

Mmm... Then we would mess up the existing open-source applications which have a fixed orientation, forcing their authors to add their applications to the blacklist. Hildon rotation window flags would lose their meaning, if your application is not blacklisted.

Ciao,
  Alberto

--
http://blog.mardy.it <- geek in un lingua international!
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to