Ticket #3600 (new enhancement)

Opened 21 months ago

Last modified 21 months 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 21 months ago.

Change History

Changed 21 months ago by mooffie

comment:1 Changed 21 months ago by zaytsev

Wow!

Note: See TracTickets for help on using tickets.