aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2008-09-15 17:57:39 +0000
committerRoss Burton <ross@linux.intel.com>2008-09-15 17:57:39 +0000
commit4b29b8d0d8b011084cdd6e62b73f9503bea884d6 (patch)
tree361c81bd6298f2233318c4f9d7b3e599db023d40
parentf4b6a59ca56578a8b5aa56d601512a83a92cdcf3 (diff)
downloadmatchbox-window-manager-2-4b29b8d0d8b011084cdd6e62b73f9503bea884d6.zip
matchbox-window-manager-2-4b29b8d0d8b011084cdd6e62b73f9503bea884d6.tar.gz
matchbox-window-manager-2-4b29b8d0d8b011084cdd6e62b73f9503bea884d6.tar.bz2
2008-09-15 Ross Burton <ross@linux.intel.com>
* matchbox/core/mb-window-manager.[ch]: Make get_desktop_geometry a vfunc, so that subclasses can override it.
-rw-r--r--ChangeLog6
-rw-r--r--matchbox/core/mb-window-manager.c18
-rw-r--r--matchbox/core/mb-window-manager.h2
3 files changed, 25 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 275884a..5f811ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-15 Ross Burton <ross@linux.intel.com>
+
+ * matchbox/core/mb-window-manager.[ch]:
+ Make get_desktop_geometry a vfunc, so that subclasses can override
+ it.
+
2008-09-12 Tomas Frydrych <tf@linux.intel.com>
* matchbox/managers/simple/Makefile.am:
diff --git a/matchbox/core/mb-window-manager.c b/matchbox/core/mb-window-manager.c
index c7e65e5..6bb5bb6 100644
--- a/matchbox/core/mb-window-manager.c
+++ b/matchbox/core/mb-window-manager.c
@@ -76,6 +76,9 @@ static Bool
mb_wm_is_my_window (MBWindowManager *wm, Window xwin,
MBWindowManagerClient **client);
+static void
+mb_wm_real_get_desktop_geometry (MBWindowManager *wm, MBGeometry *geom);
+
static MBWindowManagerClient*
mb_wm_client_new_func (MBWindowManager *wm, MBWMClientWindow *win)
{
@@ -259,6 +262,7 @@ mb_wm_class_init (MBWMObjectClass *klass)
wm_class->theme_new = mb_wm_real_theme_new;
wm_class->client_activate = mb_wm_activate_client_real;
wm_class->layout_new = mb_wm_layout_new_real;
+ wm_class->get_desktop_geometry = mb_wm_real_get_desktop_geometry;
#if ENABLE_CLUTTER_COMPOSITE_MANAGER
wm_class->main = mb_wm_main_real;
@@ -1346,7 +1350,7 @@ mb_wm_manage_preexistsing_wins (MBWindowManager* wm)
}
static void
-mb_wm_get_desktop_geometry (MBWindowManager *wm, MBGeometry * geom)
+mb_wm_real_get_desktop_geometry (MBWindowManager *wm, MBGeometry * geom)
{
MBWindowManagerClient *c;
MBGeometry p_geom;
@@ -1383,6 +1387,18 @@ mb_wm_get_desktop_geometry (MBWindowManager *wm, MBGeometry * geom)
}
static void
+mb_wm_get_desktop_geometry (MBWindowManager *wm, MBGeometry * geom)
+{
+ MBWindowManagerClass *wm_class;
+
+ wm_class = (MBWindowManagerClass *) MB_WM_OBJECT_GET_CLASS (wm);
+
+ MBWM_ASSERT (wm_class->get_desktop_geometry);
+
+ wm_class->get_desktop_geometry (wm, geom);
+}
+
+static void
mb_wm_update_root_win_rectangles (MBWindowManager *wm)
{
Display * dpy = wm->xdpy;
diff --git a/matchbox/core/mb-window-manager.h b/matchbox/core/mb-window-manager.h
index 02649d0..3e83532 100644
--- a/matchbox/core/mb-window-manager.h
+++ b/matchbox/core/mb-window-manager.h
@@ -125,6 +125,8 @@ struct MBWindowManagerClass
MBWMCompMgr * (*comp_mgr_new) (MBWindowManager *wm);
#endif
+ void (*get_desktop_geometry) (MBWindowManager *wm, MBGeometry *geom);
+
void (*main) (MBWindowManager *wm);
};