summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-02-28 12:19:56 +0100
committerDave Davenport <qball@gmpclient.org>2016-02-28 12:19:56 +0100
commitab57479da9460f1b9ad2152a4b83efa1e68866c5 (patch)
tree0d71c06dc3a6d513c99e8e66ddd8962fa4c60f39
parentc519b6a65a7470bc48cf17dd9d52ad772feb3def (diff)
Remove Atom with xcb_atom_t.
-rw-r--r--include/x11-helper.h2
-rw-r--r--source/dialogs/window.c4
-rw-r--r--source/view.c2
-rw-r--r--source/x11-helper.c2
-rw-r--r--test/textbox-test.c4
5 files changed, 9 insertions, 5 deletions
diff --git a/include/x11-helper.h b/include/x11-helper.h
index 34454405..0c4cb3d5 100644
--- a/include/x11-helper.h
+++ b/include/x11-helper.h
@@ -21,7 +21,7 @@
*
* @returns a newly allocated string with the result or NULL
*/
-char* window_get_text_prop ( xcb_connection_t *xcb_connection, xcb_window_t w, Atom atom );
+char* window_get_text_prop ( xcb_connection_t *xcb_connection, xcb_window_t w, xcb_atom_t atom );
void window_set_atom_prop ( xcb_connection_t *xcb_connection, xcb_window_t w, xcb_atom_t prop, xcb_atom_t *atoms, int count );
diff --git a/source/dialogs/window.c b/source/dialogs/window.c
index 319b1a2c..b4189f7e 100644
--- a/source/dialogs/window.c
+++ b/source/dialogs/window.c
@@ -216,7 +216,7 @@ static xcb_get_window_attributes_reply_t * window_get_attributes ( xcb_connectio
return NULL;
}
// _NET_WM_STATE_*
-static int client_has_state ( client *c, Atom state )
+static int client_has_state ( client *c, xcb_atom_t state )
{
for ( int i = 0; i < c->states; i++ ) {
if ( c->state[i] == state ) {
@@ -226,7 +226,7 @@ static int client_has_state ( client *c, Atom state )
return 0;
}
-static int client_has_window_type ( client *c, Atom type )
+static int client_has_window_type ( client *c, xcb_atom_t type )
{
for ( int i = 0; i < c->window_types; i++ ) {
if ( c->window_type[i] == type ) {
diff --git a/source/view.c b/source/view.c
index c40df28b..7a59ae23 100644
--- a/source/view.c
+++ b/source/view.c
@@ -551,7 +551,7 @@ static Window __create_window ( xcb_connection_t *xcb_connection, xcb_screen_t *
xcb_ewmh._NET_WM_STATE_FULLSCREEN,
xcb_ewmh._NET_WM_STATE_ABOVE
};
- window_set_atom_prop ( xcb_connection, box, xcb_ewmh._NET_WM_STATE, atoms, sizeof ( atoms ) / sizeof ( Atom ) );
+ window_set_atom_prop ( xcb_connection, box, xcb_ewmh._NET_WM_STATE, atoms, sizeof ( atoms ) / sizeof ( xcb_atom_t ) );
}
// Set the WM_NAME
diff --git a/source/x11-helper.c b/source/x11-helper.c
index 200fedf8..5accac79 100644
--- a/source/x11-helper.c
+++ b/source/x11-helper.c
@@ -76,7 +76,7 @@ extern xcb_connection_t *xcb_connection;
// retrieve a text property from a window
// technically we could use window_get_prop(), but this is better for character set support
-char* window_get_text_prop ( xcb_connection_t *xcb_connection, xcb_window_t w, Atom atom )
+char* window_get_text_prop ( xcb_connection_t *xcb_connection, xcb_window_t w, xcb_atom_t atom )
{
xcb_get_property_cookie_t c = xcb_get_property( xcb_connection, 0, w, atom, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX);
xcb_get_property_reply_t *r = xcb_get_property_reply( xcb_connection, c, NULL);
diff --git a/test/textbox-test.c b/test/textbox-test.c
index 8ba2434f..c4b3fe48 100644
--- a/test/textbox-test.c
+++ b/test/textbox-test.c
@@ -48,6 +48,10 @@ int show_error_message ( const char *msg, int markup )
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
{
+ cairo_surface_t *surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 100, 100);
+ cairo_t *draw = cairo_create(surf);
+ PangoContext *p = pango_cairo_create_context ( draw );
+ textbox_set_pango_context ( p );
textbox *box = textbox_create ( TB_EDITABLE | TB_AUTOWIDTH | TB_AUTOHEIGHT, 0, 0, -1, -1,
NORMAL, "test" );