summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 07:18:11 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2010-07-21 07:18:11 +0200
commit82c6feae82fad6efbb619296b9d8e31ace257b10 (patch)
treeed72ead501be52db2f9de6dfe5d80370f388462c /mcwm.c
parent2ad594d265e4692886eabd854576c3affbda8e52 (diff)
downloadmcwm-82c6feae82fad6efbb619296b9d8e31ace257b10.zip
Check if we have a focused window before doing anything!
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/mcwm.c b/mcwm.c
index f0c743a..4d43601 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -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))
{