diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-02-28 12:18:15 +0100 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-02-28 12:21:26 +0100 |
commit | 644556b7b6438a187150799bdbb929f9c2d5f431 (patch) | |
tree | 85a367fe5e2f766c32eb08ce816e056383865457 | |
parent | 73a0eb3e398fb234cb4ded54608c9c2ef06cf4c3 (diff) |
Change Window/Atom to xcb_window_t/xcb_atom_t
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r-- | include/i3-support.h | 2 | ||||
-rw-r--r-- | source/dialogs/window.c | 16 | ||||
-rw-r--r-- | source/i3-support.c | 4 | ||||
-rw-r--r-- | source/view.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/include/i3-support.h b/include/i3-support.h index 43db0769..25e5ef48 100644 --- a/include/i3-support.h +++ b/include/i3-support.h @@ -19,7 +19,7 @@ * Hopefully at some point, I3 gets fixed and this is not needed. * This function takes the path to the i3 IPC socket, and the XID of the window. */ -void i3_support_focus_window ( Window id ); +void i3_support_focus_window ( xcb_window_t id ); /** * @param display The display to read the i3 property from. diff --git a/source/dialogs/window.c b/source/dialogs/window.c index b4189f7e..ccdf9824 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -79,7 +79,7 @@ typedef struct // window lists typedef struct { - Window *array; + xcb_window_t *array; client **data; int len; } winlist; @@ -95,7 +95,7 @@ static winlist* winlist_new () { winlist *l = g_malloc ( sizeof ( winlist ) ); l->len = 0; - l->array = g_malloc_n ( WINLIST + 1, sizeof ( Window ) ); + l->array = g_malloc_n ( WINLIST + 1, sizeof ( xcb_window_t ) ); l->data = g_malloc_n ( WINLIST + 1, sizeof ( client* ) ); return l; } @@ -109,10 +109,10 @@ static winlist* winlist_new () * * @returns 0 if failed, 1 is successful. */ -static int winlist_append ( winlist *l, Window w, client *d ) +static int winlist_append ( winlist *l, xcb_window_t w, client *d ) { if ( l->len > 0 && !( l->len % WINLIST ) ) { - l->array = g_realloc ( l->array, sizeof ( Window ) * ( l->len + WINLIST + 1 ) ); + l->array = g_realloc ( l->array, sizeof ( xcb_window_t ) * ( l->len + WINLIST + 1 ) ); l->data = g_realloc ( l->data, sizeof ( client* ) * ( l->len + WINLIST + 1 ) ); } // Make clang-check happy. @@ -163,7 +163,7 @@ static void winlist_free ( winlist *l ) * * @returns -1 if failed, index is successful. */ -static int winlist_find ( winlist *l, Window w ) +static int winlist_find ( winlist *l, xcb_window_t w ) { // iterate backwards. Theory is: windows most often accessed will be // nearer the end. Testing with kcachegrind seems to support this... @@ -239,7 +239,7 @@ static int client_has_window_type ( client *c, xcb_atom_t type ) static client* window_client ( xcb_connection_t *xcb_connection, xcb_window_t win ) { - if ( win == None ) { + if ( win == XCB_WINDOW_NONE ) { return NULL; } @@ -453,7 +453,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd ) // build the actual list for ( i = 0; i < ( pd->ids->len ); i++ ) { - Window w = pd->ids->array[i]; + xcb_window_t w = pd->ids->array[i]; client *c; if ( ( c = window_client ( xcb_connection, w ) ) ) { @@ -540,7 +540,7 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i else{ xcb_ewmh_request_change_active_window ( &xcb_ewmh, xcb_screen_nbr, rmpd->ids->array[selected_line], XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER , - XCB_CURRENT_TIME, None); + XCB_CURRENT_TIME, XCB_WINDOW_NONE); xcb_flush(xcb_connection); } } diff --git a/source/i3-support.c b/source/i3-support.c index 9b932678..937bc74f 100644 --- a/source/i3-support.c +++ b/source/i3-support.c @@ -48,7 +48,7 @@ char *i3_socket_path = NULL; extern xcb_screen_t *xcb_screen; -void i3_support_focus_window ( Window id ) +void i3_support_focus_window ( xcb_window_t id ) { i3_ipc_header_t head; int s; @@ -132,7 +132,7 @@ void i3_support_free_internals ( void ) #else -void i3_support_focus_window ( G_GNUC_UNUSED Window id ) +void i3_support_focus_window ( G_GNUC_UNUSED xcb_window_t id ) { fprintf ( stderr, "Trying to control i3, when i3 support is not enabled.\n" ); abort (); diff --git a/source/view.c b/source/view.c index 7a59ae23..3baeb40f 100644 --- a/source/view.c +++ b/source/view.c @@ -485,7 +485,7 @@ static void check_is_ascii ( thread_state *t, G_GNUC_UNUSED gpointer user_data ) g_mutex_unlock ( t->mutex ); } -static Window __create_window ( xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen, MenuFlags menu_flags ) +static xcb_window_t __create_window ( xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen, MenuFlags menu_flags ) { uint32_t selmask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP; uint32_t selval[] = |