changeset 1909:8433f221dabb

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.
author corvid <corvid@lavabit.com>
date Thu, 24 Feb 2011 04:56:13 +0000
parents 8955c455fa01
children 50414b37588a
files dw/layout.cc src/uicmd.cc
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dw/layout.cc	Wed Feb 23 18:39:01 2011 +0000
+++ b/dw/layout.cc	Thu Feb 24 04:56:13 2011 +0000
@@ -852,6 +852,9 @@
    int trackLen, i;
    EventCrossing crossingEvent;
 
+   if (!topLevel)
+      return;
+
    if (newWidgetAtPoint != widgetAtPoint) {
       // The mouse pointer has been moved into another widget.
       if (newWidgetAtPoint && widgetAtPoint)
--- a/src/uicmd.cc	Wed Feb 23 18:39:01 2011 +0000
+++ b/src/uicmd.cc	Thu Feb 24 04:56:13 2011 +0000
@@ -551,7 +551,6 @@
 
    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 @@
       else
          ui->tabs()->window()->hide();
    }
+   delete(layout);
    delete(ui);
 
    a_Bw_free(bw);