Window Management

From Sugar Labs
Revision as of 20:32, 30 June 2012 by FGrose (talk | contribs) (moved WindowManagement to Window Management: deCamelCase)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Despite the fact that the Sugar UI is very different from a standard desktop, it's almost completely implemented using standard window manager hints and properties. We are planning to move from matchbox to a more compliant window manager and to address the little incompatibilities at the shell level, so that standard desktop applications can run out of the box in Sugar.

Here are some of the steps to get there:

  1. Change the sugar-shell startup code to run metacity instead of matchbox.
    1. Works. Change the _start_matchbox() method in sugar/src/main.py to start metacity instead of matchbox
  2. See which parts of Sugar breaks. I expect the frame will not work well, the windows needs to be hinted as panels.
    1. Frame breaks. However, it works fine if it is hinted as a panel. Add self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) to the __init__() method of the FrameWindow class in sugar/src/view/frame/framewindow.py
    2. Activity switching (eg: by clicking on the currently running activity's icon on the home view) does not seem to work.
  3. Decide how to make activities run fullscreen. We could either modify metacity to run every toplevel window in fullscreen. Or we could set the fullscreen hint on the activity windows. We should clarify the tradeoffs there.
    1. Setting the window to be fullscreen (via set_fullscreen())does not seem to work, since it stops the frame from popping up, and also an icon to exit fullscreen appears at the top right corner. One possible solution to this is to make the activity window undecorated (we do not need maximise/minimize/resize buttons), and making their height/width equal to the dimensions of the screen.
Maximized + undecorated perhaps? -- Marcopg
Tried that. As soon as I set the window to undecorated, it seems to assume fullscreen properties. Is there any convention which signifies maximized + undecorated = fullscreen ? -- SayaminduDasgupta
Maybe some hacks in metacity :( -- Marcopg
Setting the resizeable property of the activity Window to False seems to be a workaround for the issue -- SayaminduDasgupta
Modified metacity to make each toplevel window fullscreen (undecorated + maximized). It works for all the activities as well as standard GUI apps (eg: gedit, gcalctool, etc). Only application which was a pain to use was GIMP, due to its use of the SDI paradigm. SayaminduDasgupta
I managed to compositing working also SayaminduDasgupta
Here's what Ubuntu Netbook Remix is doing: "The permanently-maximized window state is handled by a program called Maximus that runs silently in the background. The Remix environment is still using the regular old Metacity window manager." -- http://arstechnica.com/news.ars/post/20080604-hands-on-with-the-ubuntu-netbook-remix.html - the code is at https://code.launchpad.net/~netbook-remix-team/netbook-remix/maximus "Although the windowing model is good for devices with small screens and the implementation is clever, the Maximus program is still a bit of a hack and doesn't really work well in certain corner cases. The most visible place where it breaks down is when testing The GIMP, which uses floating palettes. These get maximized and overlap each other, obscuring the main program content and making it impossible to use. Those kinds of bugs will have to be worked out before the software is ready for widespread adoption." --Morgs 10:34, 5 June 2008 (UTC)
Suggestion by Albert Cahalan:
Consider running one Sugar activity per virtual desktop. This would allow multi-window programs like the infamous gimp to fit in pretty well, except that of course they are not full-screen and thus receive window borders. Nobody ever sees a window border until they run something that isn't full-screen.
  1. Support standard window icons in the frame activity list.
    1. TBD