Package: guichan / 0.8.2-16

03-no-focushandler.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Fix potential crash with uae4all and improve error messages.
# URL: https://github.com/sphaero/guichan/commit/1a727941539e7ed4376dc8194cb4988961c86340

diff -Naur guichan-0.8.2.orig/src/widget.cpp guichan-0.8.2/src/widget.cpp
--- guichan-0.8.2.orig/src/widget.cpp	2009-09-03 22:35:02.000000000 +0200
+++ guichan-0.8.2/src/widget.cpp	2015-07-29 22:39:16.672436034 +0200
@@ -269,7 +269,7 @@
     {
         if (mFocusHandler == NULL)
         {
-            throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
+            throw GCN_EXCEPTION("No focushandler set (requestFocus: did you add the widget to the gui?).");
         }
 
         if (isFocusable())
@@ -558,7 +558,7 @@
     {
         if (mFocusHandler == NULL)
         {
-            throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
+            throw GCN_EXCEPTION("No focushandler set (requestModalFocus: did you add the widget to the gui?).");
         }
 
         mFocusHandler->requestModalFocus(this);
@@ -568,7 +568,7 @@
     {
         if (mFocusHandler == NULL)
         {
-            throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
+            throw GCN_EXCEPTION("No focushandler set (requestModalMouseInputFocus: did you add the widget to the gui?).");
         }
 
         mFocusHandler->requestModalMouseInputFocus(this);
@@ -598,7 +598,8 @@
     {
         if (mFocusHandler == NULL)
         {
-            throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
+            return false;
+            //throw GCN_EXCEPTION("No focushandler set (isModalFocused: did you add the widget to the gui?).");
         }
 
         if (getParent() != NULL)
@@ -614,7 +615,8 @@
     {
         if (mFocusHandler == NULL)
         {
-            throw GCN_EXCEPTION("No focushandler set (did you add the widget to the gui?).");
+            return false;
+            //throw GCN_EXCEPTION("No focushandler set (isModalMouseInputFocused: did you add the widget to the gui?).");
         }
 
         if (getParent() != NULL)
diff -Naur guichan-0.8.2.orig/src/widgets/tabbedarea.cpp guichan-0.8.2/src/widgets/tabbedarea.cpp
--- guichan-0.8.2.orig/src/widgets/tabbedarea.cpp	2009-09-03 22:35:02.000000000 +0200
+++ guichan-0.8.2/src/widgets/tabbedarea.cpp	2015-07-29 22:39:16.672436034 +0200
@@ -317,6 +317,10 @@
 
     void TabbedArea::logic()
     {
+        for (unsigned int i = 0; i < mTabs.size(); i++)
+        {
+                  mTabs[i].second->logic();
+        }
     }
 
     void TabbedArea::adjustSize()