Ideal screen rotation

Carsten Haitzler (The Rasterman) raster at
Sun Nov 8 02:26:12 CET 2009

On Sat, 7 Nov 2009 15:04:46 +0000 Neil Jerram <neiljerram at> said:

> 2009/11/7 Carsten Haitzler <raster at>:
> > On Sat, 7 Nov 2009 08:33:35 +0000 Neil Jerram <neiljerram at>
> > said:
> >
> >> 2009/11/7 Carsten Haitzler <raster at>:
> >> >
> >> > no. the proper way is to set properties on your window.
> >>
> >> How exactly does that (setting a property) happen though?  Is it
> >
> > how does setting the title? or the min/max size of the window happen? the
> > name and class, window role, if its a dialog, transient for which window,
> > if the app would like it to be borderless... all of these are properties.
> > try "xprop" and clikc on a window. any window (freerunner or desktop -
> > doesn't matter). THOSE are properties. you can add/create/define any
> > properties you like. they hang onto the window until they are modified or
> > deleted or the window is deleted.
> >
> >> something that the app would normally do in its own startup code?  (I
> >
> > yes. see above. apps are doing it all the time. it's about the most standard
> > way to provide information about your window, from title to minimum and
> > maximum size to aspect ratios and more. rotation preferences are just yet
> > more properties like this. if its a "property" of the window - put it as a
> > property of the window. use the mechanism created for precisely this kind
> > of thing. dbus is not that mechanism.
> Thanks.  I think I'll look at adding this into the e17 WM.  If you can
> recommend a good place in the code to starting working on this (i.e.
> checking for a rotation property, and invoking xrandr or omnewrotate
> accordingly), that would be great.

1. dont invoke any commands. a fork+exec is expensive when you can just issue a
protocol request to x. the most you will do is exec omnewrotte and give
omnewrotate the ability to report rotation via dbus or vis stdout. hell maybe
just put it in a thread and write current rotation, if it changes, down a pipe
() to the main loop.
2. look at modules in general. this is how you patch the wm. :)
3. look at conf_display module - it does resolution changes and rotation
preferences already
4. look at pager module for tracking new windows (or window deletes, the
currently active window etc.
5. look at e_hints.c for getting hints. some of this is wrappers around
existing well known icccm and netwm properties, some is getting custom
properties not wrapped.
6. look at e_border.c for more info on tracking property changes (set up a
handler for the event) etc. etc.
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at

More information about the community mailing list