Ticket #3600 (new enhancement)

Opened 8 years ago

Last modified 8 years ago

Make it possible to drag dialogs.

Reported by: mooffie Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Sometimes dialog obscures important information.

The attached patch lets us drag dialogs on screen. It even works while copying/moving files.

But the purpose of this patch is mainly to help shape the mouse API. It doesn't matter if it doesn't get committed. Specifically, the patch shows a way to get rid of midnight_mouse_callback() in ticket:3571.

The patch works by installing a "default mouse handler" for dialogs that don't define any. By using the DLG_MOUSE_POST_PROCESSING flag this handler gets to see any mouse events not handled by child widgets. The effect is that you can drag the dialog by dragging any "empty" space within (space not responding to mouse events, to be exact). In this it's different (and more powerful) than conventional GUIs that let you drag only by the frame. (I borrowed the idea from FAR.)

Attachments

3600-Make-it-possible-to-drag-dialogs.patch (6.9 KB) - added by mooffie 8 years ago.

Change History

Changed 8 years ago by mooffie

comment:1 Changed 8 years ago by zaytsev

Wow!

Note: See TracTickets for help on using tickets.