Wheeeee! Desktop icons can be selected by rubberbanding. You
need Englightenment to do this, as so far it seems to be the only
WM with support for the _WIN_DESKTOP_BUTTON_PROXY property.
* gdesktop.c (click_proxy_filter): New event filter for button
presses and releases on the root window.
(click_proxy_button_press): New function to handle button presses
on the desktop.
(click_proxy_button_release): New function to handle button
releases on the desktop.
(click_proxy_motion): New function to handle rubberbanding motion
on the desktop.
(setup_xdnd_proxy): Flush the server after ungrabbing it.
(find_click_proxy_window): Flush the server after ungrabbing it.
(store_temp_selection): Stores the temporary selection to the
master selection, or viceversa. This is needed for dynamic
updating while the user rubberbands.
(update_drag_selection): New function to update the selection
while the user is rubberbanding on the desktop.
(icon_is_in_area): New function to see if an icon is inside the
rubberbanding area.
* gdesktop-icon.h: Added fields for querying the icon and text
position and size.
* gdesktop-icon.c (desktop_icon_reshape): Set the position and
size fields as computed for layout.
* gdesktop.c: Moved the old DnD cruft to olddnd.c to keep it there
for reference purposes.
* gmetadata.c: Removed the gmeta_get_icon_for_file() function, as
it is obsoleted by gicon_get_icon_for_file().
* gdesktop.c (desktop_icon_info_new): Made it use
gicon_get_icon_for_file().
* gdesktop-icon.c (set_icon): Now we handle things internally
using an imlib image, not a filename.
(desktop_icon_new): Now takes an imlib image for the icon instead
of a filename.
(desktop_icon_set_icon): Likewise.
* gdesktop-icon.h (DesktopIcon): Added a child item for stippling
the icon when it is selected.
* gdesktop-icon.c (desktop_icon_select): Show/hide the stippling
as appropriate.
* gdesktop.c (desktop_icon_info_event): Handler for events on
desktop icons.
(select_icon): New function that handles icon selection based on
mouse clicks and modifier keys.
* gdesktop.c (struct desktop_icon_info): Added a type field to the
structure. It specifies the type of icon (file, directory), and
is used to determine the DnD and menu behavior.
* gdesktop-icon.c (create_window_shape): Use shaped icons only
when the user has selected them.
(desktop_icon_reshape): New public function to recompute the shape
of the icon. This should be used when the global
desktop_use_shaped_icons flag changes.
Added documentation comments to the public functions.
1998-10-21 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (create_desktop_icon): Renamed from
my_create_transparent_text_window. Now uses the DesktopIcon
widget for its work.
(get_desktop_icon_for_dentry): Renamed from
get_transparent_window_for_dentry. Uses the DesktopIcon widget.
(get_desktop_icon_for_di): Renamed from
get_transparent_window_for_di.
(desktop_icon_properties): Do not size_request the icon, since now
we can get its dimensions directly from the DesktopIcon structure.
* desktop-icon.[ch]: New file that takes care of desktop icons.
It provides the spiffy widget that is used for them.
* Makefile.in: Added desktop-icon.[ch] to the list of sources.
MC should use Automake, I think.