From 7a65a910b77ad191d69881098c47f9b0c852d92e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 01:33:19 -0700 Subject: Tue Aug 13 01:31:08 PDT 2013 --- community/beye/biew-610-setup_window-1.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 community/beye/biew-610-setup_window-1.patch (limited to 'community/beye/biew-610-setup_window-1.patch') diff --git a/community/beye/biew-610-setup_window-1.patch b/community/beye/biew-610-setup_window-1.patch new file mode 100644 index 000000000..244f94a7a --- /dev/null +++ b/community/beye/biew-610-setup_window-1.patch @@ -0,0 +1,28 @@ +If .biewrc does not exist, the setup dialog appears at program start. If you try +to click a checkbox with the mouse, biew tries to dereference a null pointer +(because the MainWindow is not yet set). + +This patch adds a workaround. Note that you actually cannot click a checkbox. +But that is what users might expect. (Maybe the biew code should be changed to +handle this properly.) Well, it is better not to crash, even if the checkboxes +are not clickable. + + –nico + + +diff -Naur biew-610.orig/events.c biew-610/events.c +--- biew-610.orig/events.c 2009-09-03 16:57:40.000000000 +0000 ++++ biew-610/events.c 2011-09-06 09:41:01.000000000 +0000 +@@ -118,7 +118,11 @@ + } + else + { +- X1 = 0; X2 = twGetClientWidth(MainWnd); Y1 = 1; Y2 = twGetClientHeight(MainWnd) - 1; ++ TWindow *wnd = ++ MainWnd ? MainWnd : /*XXX:drop this line?*/ ++ twGetWinAtPos(mx, my); ++ if(!wnd) return KE_MOUSE; ++ X1 = 0; X2 = twGetClientWidth(wnd); Y1 = 1; Y2 = twGetClientHeight(wnd) - 1; + } + wdh = X2 - X1; + hght = Y2 - Y1; -- cgit v1.2.3-54-g00ecf