diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-04-10 09:27:22 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-04-10 09:27:22 +0200 |
commit | 4156d142fe9429cbf35856a2687566f05ab10177 (patch) | |
tree | d9aef9f6c4e6d2bf96d0c6e10d4d866098c36a0c /source | |
parent | 79c33cfca6835cef208af294a1f398ca05358027 (diff) |
Set PID and wm_client_machine hints on rofi window.
Diffstat (limited to 'source')
-rw-r--r-- | source/view.c | 15 |
1 files changed, 15 insertions, 0 deletions
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); + } } /** |