aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window.c10
-rw-r--r--src/window.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index 7912bd0..fb0ae90 100644
--- a/src/window.c
+++ b/src/window.c
@@ -55,6 +55,16 @@ cherry_window_new(void)
return w;
}
+char *
+cherry_window_get_title(CherryWindow *w)
+{
+ char *wnd_name;
+ CherryApplication *app = cherry_application_get_running_app();
+ XFetchName(app->display, w->window_handler, &wnd_name);
+
+ return wnd_name;
+}
+
void
cherry_window_set_title(CherryWindow *w, char *title)
{
diff --git a/src/window.h b/src/window.h
index 9f3962c..e22badc 100644
--- a/src/window.h
+++ b/src/window.h
@@ -16,6 +16,7 @@ typedef struct {
} CherryWindow;
CherryWindow *cherry_window_new(void);
+char *cherry_window_get_title(CherryWindow *);
void cherry_window_set_title(CherryWindow *, char *);
void cherry_window_set_dimension(CherryWindow *, int, int);
void cherry_window_set_position(CherryWindow *, int, int);