aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-11 20:08:41 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-11 20:08:41 +1000
commitd02b5e06e9c3e49e59cb22f3adf95f547a7e08b4 (patch)
treea75cf3a4f713a61c3e52f86940cd13b747a71cbf
parent7e915a8017fe1f6fb9963c6389708b63e77f8180 (diff)
downloaduGFX-d02b5e06e9c3e49e59cb22f3adf95f547a7e08b4.tar.gz
uGFX-d02b5e06e9c3e49e59cb22f3adf95f547a7e08b4.tar.bz2
uGFX-d02b5e06e9c3e49e59cb22f3adf95f547a7e08b4.zip
Visible and Enabled GWIN bug fix
-rw-r--r--src/gwin/gwin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index dfcb8d4c..2e4144a7 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -276,7 +276,7 @@ const char *gwinGetClassName(GHandle gh) {
}
static bool_t clrSysVisFlag(GHandle gh) {
// If we are now not visible but our parent is visible
- if (!(gh->flags & GWIN_FLG_VISIBLE) && (!gh->parent || (gh->parent->flags & GWIN_FLG_SYSVISIBLE))) {
+ if (!(gh->flags & GWIN_FLG_VISIBLE) || (gh->parent && !(gh->parent->flags & GWIN_FLG_SYSVISIBLE))) {
gh->flags &= ~GWIN_FLG_SYSVISIBLE;
return TRUE;
}
@@ -329,7 +329,7 @@ bool_t gwinGetVisible(GHandle gh) {
}
static bool_t clrSysEnaFlag(GHandle gh) {
// If we are now not enabled but our parent is enabled
- if (!(gh->flags & GWIN_FLG_ENABLED) && (!gh->parent || (gh->parent->flags & GWIN_FLG_SYSENABLED))) {
+ if (!(gh->flags & GWIN_FLG_ENABLED) || (gh->parent && !(gh->parent->flags & GWIN_FLG_SYSENABLED))) {
gh->flags &= ~GWIN_FLG_SYSENABLED;
return TRUE;
}