From 6a4f6a1cb3411f43663745e16967671e1c6723a8 Mon Sep 17 00:00:00 2001
From: Sam Spilsbury <smspillaz@gmail.com>
Date: Thu, 4 Jun 2009 14:40:00 +0800
Subject: [PATCH] Make bool CompWindow::isFocussable () wrappable

---
 include/core/window.h |    9 +++------
 src/window.cpp        |    8 +++++++-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/include/core/window.h b/include/core/window.h
index f8e77a4..31635c0 100644
--- a/include/core/window.h
+++ b/include/core/window.h
@@ -176,7 +176,6 @@ enum CompWindowNotify {
    CompWindowNotifyUnreparent,
    CompWindowNotifyFrameUpdate,
    CompWindowNotifyFocusChange,
-   CompWindowNotifyBeforeUnmap,
    CompWindowNotifyBeforeDestroy,
    CompWindowNotifyClose,
    CompWindowNotifyMinimize,
@@ -228,10 +227,11 @@ class WindowInterface : public WrapableInterface<CompWindow, WindowInterface>
 	virtual void updateFrameRegion (CompRegion &region);
 
 	virtual bool alpha ();
+	virtual bool isFocussable ();
 };
 
 class CompWindow :
-    public WrapableHandler<WindowInterface, 14>,
+    public WrapableHandler<WindowInterface, 15>,
     public PluginClassStorage
 {
     public:
@@ -450,8 +450,6 @@ class CompWindow :
 
 	bool syncWait ();
 
-	bool alpha ();
-
 	bool alive ();
 
 	bool overrideRedirect ();
@@ -459,8 +457,6 @@ class CompWindow :
 	bool isMapped () const;
 	bool isViewable () const;
 
-	bool isFocussable () const;
-
 	int windowClass ();
 
 	unsigned int depth ();
@@ -504,6 +500,7 @@ class CompWindow :
 		      CompRegion &);
 
 	WRAPABLE_HND (13, WindowInterface, bool, alpha);
+	WRAPABLE_HND (14, WindowInterface, bool, isFocussable);
 
 	friend class PrivateWindow;
 	friend class CompScreen;
diff --git a/src/window.cpp b/src/window.cpp
index a98742b..4a4cbbd 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -4216,6 +4216,10 @@ bool
 WindowInterface::alpha ()
     WRAPABLE_DEF (alpha);
 
+bool
+WindowInterface::isFocussable ()
+    WRAPABLE_DEF (isFocussable);
+
 Window
 CompWindow::id ()
 {
@@ -5123,8 +5127,10 @@ CompWindow::isViewable () const
 }
 
 bool
-CompWindow::isFocussable () const
+CompWindow::isFocussable ()
 {
+    WRAPABLE_HND_FUNC_RETURN (14, bool, isFocussable);
+
     if (priv->inputHint)
 	return true;
 
-- 
1.5.6

