Dragging the window icon

Listen to this.

A user writes:

At the moment i’m trying to make a theme for metacity but I have no idea how I can make the document icon drag-able and to interact with the desktop environment i.e. drag to the desktop to save or to the trash to delete.

Firstly, let me thank you for being willing to work on developing the desktop.

To begin with, this idea was based on “Window Experiments”.  desrt developed this idea into a program called icanhasedit back in August, which worked by taking over the responsibility of drawing window decorations from the window manager.  That’s certainly one way of going about solving the problem, but it brings a whole raft of problems of its own.  So let’s assume we want to keep the decorator in the window manager here.

Secondly, there is nothing in Metacity corresponding to “the document icon” as such.  It happens that most themes draw the icon of the current window on the menu button– the button which shows the window menu when you click it.  Some themes do it other ways, though: for example, Atlanta draws the icon on the titlebar next to the window’s name.  But let’s assume what we want is for the menu button to be draggable.

So you need to implement drag-and-drop from the widget representing that button.  Once that’s done, you need to have a way to tell what should actually happen when the button is dragged somewhere.  The trouble is that Metacity doesn’t know much about what’s actually in the window: it knows the name and the icon and a few other things, but the actual content is the business of the application.  So you need to invent a way for the WM to tell the application that a drag is happening, and for the application to tell the WM what the data being dragged is, and what its type is.  Then you need to argue it out on wm-spec-list and then you need to get applications actually to implement it so it’s useful.

So: this is possible, but it’s complicated and probably not an ideal first project.  If you want to try solving it, please go ahead and I’ll give you what help I can.  If you’d rather do something easier first and ramp up to this, I can help you with that too.

metacity 2.25.34

Matt Kraai noticed a stupid mistake in last night’s release, so this is a brown paper bag fix.  It was too late at night to write anything sensible, clearly.

What is it ?

  • Metacity is a simple compositing window manager that integrates nicely
    with GNOME 2.

What’s changed ?

  • Fixes to Thomas’s earlier fixes (Matt) (GNOME bug 562939)

Translations:

  • None

Where can I get it ?

metacity 2.25.12 out

What is it ?

  • Metacity is a simple compositing window manager that integrates nicely
    with GNOME 2.

What’s changed ?

  • Fixes to allow building without compositor again (Thomas)
  • Fixes for -Wall problems (Thomas)
  • Various tool updates (Thomas)

Translations:

  • None.

Where can I get it ?

  • 933699f7ce80b5269cc9880f338e328b
    http://download.gnome.org/sources/metacity/2.25/metacity-2.25.21.tar.bz2
  • 8d183983e25cde2cc27875b238465514
    http://download.gnome.org/sources/metacity/2.25/metacity-2.25.21.tar.gz
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.