diff --git a/source/view.c b/source/view.c index f9fb62c8..bfa52bde 100644 --- a/source/view.c +++ b/source/view.c @@ -768,6 +768,21 @@ void __create_window ( MenuFlags menu_flags ) TICK_N ( "setup startup notification" ); widget_free ( WIDGET ( win ) ); TICK_N ( "done" ); + + // Set the PID. + pid_t pid= getpid (); + xcb_ewmh_set_wm_pid (&(xcb->ewmh), CacheState.main_window, pid ); + + // Get hostname + const char *hostname = g_get_host_name (); + char *ahost = g_hostname_to_ascii ( hostname ); + if ( ahost != NULL ) { + xcb_icccm_set_wm_client_machine(xcb->connection, + CacheState.main_window, + XCB_ATOM_STRING, 8, + strlen(ahost), ahost); + g_free(ahost); + } } /** diff --git a/test/textbox-test.c b/test/textbox-test.c index 664b4b61..6a7922ed 100644 --- a/test/textbox-test.c +++ b/test/textbox-test.c @@ -57,8 +57,12 @@ 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_setup(); textbox_set_pango_context ( "default", p ); + textbox *box = textbox_create ( "textbox", TB_EDITABLE | TB_AUTOWIDTH | TB_AUTOHEIGHT, NORMAL, "test" ); TASSERT ( box != NULL );