mirror of
https://github.com/lbonn/rofi
synced 2024-11-12 23:27:15 +00:00
Set PID and wm_client_machine hints on rofi window.
This commit is contained in:
parent
79c33cfca6
commit
4156d142fe
2 changed files with 19 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue