]> Dogcows Code - chaz/openbox/blobdiff - otk/button.cc
pointer's variables are config vars
[chaz/openbox] / otk / button.cc
index c0f48100056d0648f9e1496640ed60a8f14485b0..313d8acfcf52751e0b56162444763cba6a84ec4b 100644 (file)
@@ -1,8 +1,6 @@
 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
-#ifdef HAVE_CONFIG_H
-# include "../config.h"
-#endif
+#include "config.h"
 
 #include "button.hh"
 
@@ -51,7 +49,11 @@ void Button::buttonPressHandler(const XButtonEvent &e)
 void Button::buttonReleaseHandler(const XButtonEvent &e)
 {
   Widget::buttonReleaseHandler(e);
+  bool p = _pressed;
   release(e.button);
+  if (p && !_pressed && e.x > 0 && e.y > 0 &&
+      e.x < area().width() && e.y < area().height())
+    clickHandler(_mouse_button);
 }
 
 void Button::styleChanged(const RenderStyle &style)
This page took 0.020228 seconds and 4 git commands to generate.