diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2010-07-21 07:18:11 +0200 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2010-07-21 07:18:11 +0200 |
commit | 82c6feae82fad6efbb619296b9d8e31ace257b10 (patch) | |
tree | ed72ead501be52db2f9de6dfe5d80370f388462c /mcwm.c | |
parent | 2ad594d265e4692886eabd854576c3affbda8e52 (diff) | |
download | mcwm-82c6feae82fad6efbb619296b9d8e31ace257b10.zip |
Check if we have a focused window before doing anything!
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1858,6 +1858,11 @@ void topleft(void) int16_t pointx; int16_t pointy; + if (NULL == focuswin) + { + return; + } + if (!getpointer(focuswin->id, &pointx, &pointy)) { return; @@ -1877,6 +1882,11 @@ void topright(void) uint16_t height; int16_t pointx; int16_t pointy; + + if (NULL == focuswin) + { + return; + } if (!getpointer(focuswin->id, &pointx, &pointy)) { @@ -1905,6 +1915,11 @@ void botleft(void) uint16_t height; int16_t pointx; int16_t pointy; + + if (NULL == focuswin) + { + return; + } if (!getpointer(focuswin->id, &pointx, &pointy)) { @@ -1932,6 +1947,11 @@ void botright(void) uint16_t height; int16_t pointx; int16_t pointy; + + if (NULL == focuswin) + { + return; + } if (!getpointer(focuswin->id, &pointx, &pointy)) { |