aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-02-24 04:56:13 +0000
committercorvid <corvid@lavabit.com>2011-02-24 04:56:13 +0000
commite90273b90ea846855dfeb5fd675104d26114701e (patch)
tree7a415a6e5ddb93b214c21bbd3473f473123b58ce
parentbc476c13039158dea4e5370987f5f5adbff4f02d (diff)
add some band-aids again for now for this whole events-during-deletion problem
Conceptually, what feels like it 'should' happen when the form widgets are deleted and MOVEs and LEAVEs and whatnot are flying around is for the viewport not to do anything with events. But it would want to accept FOCUS, and no doubt there are other cases to make it not so simple.
-rw-r--r--dw/layout.cc3
-rw-r--r--src/uicmd.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index 3680e0c8..d1fecf48 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -852,6 +852,9 @@ void Layout::moveToWidget (Widget *newWidgetAtPoint, ButtonState state)
int trackLen, i;
EventCrossing crossingEvent;
+ if (!topLevel)
+ return;
+
if (newWidgetAtPoint != widgetAtPoint) {
// The mouse pointer has been moved into another widget.
if (newWidgetAtPoint && widgetAtPoint)
diff --git a/src/uicmd.cc b/src/uicmd.cc
index 885d704e..268321d6 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -551,7 +551,6 @@ void a_UIcmd_close_bw(void *vbw)
MSG("a_UIcmd_close_bw\n");
a_Bw_stop_clients(bw, BW_Root + BW_Img + BW_Force);
- delete(layout);
if (ui->tabs()) {
ui->tabs()->remove(ui);
if (ui->tabs()->value())
@@ -559,6 +558,7 @@ void a_UIcmd_close_bw(void *vbw)
else
ui->tabs()->window()->hide();
}
+ delete(layout);
delete(ui);
a_Bw_free(bw);