! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Window title omits WM_CLIENT_MACHINE on initial window mapping
Status:
RESOLVED: FIXED
Component:
Decorations

Comments

Description Sam Varshavchik 2019-09-22 15:41:48 CEST
xfwm4 4.14:

An initial mapped window's title fails to include the " (on WM_CLIENT_MACHINE)" suffix. The suffix gets added when the window's title gets subsequently changed.

The following short program creates a window. The initial title does not have the suffix, and only shows as "Lorem". After a five second delay the window's title gets changed to "Ipsum (on external.example.com)".

#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcb_ewmh.h>
#include <xcb/xcb_icccm.h>

int
main ()
{
        xcb_connection_t *connection = xcb_connect (NULL, NULL);
	xcb_ewmh_connection_t ewmh;
	xcb_generic_error_t *err;

        const xcb_setup_t      *setup  = xcb_get_setup (connection);
        xcb_screen_iterator_t   iter   = xcb_setup_roots_iterator (setup);
        xcb_screen_t           *screen = iter.data;

	xcb_intern_atom_cookie_t *cookie=
		xcb_ewmh_init_atoms(connection, &ewmh);

	xcb_ewmh_init_atoms_replies(&ewmh,
				    cookie,
				    &err);

        xcb_window_t window = xcb_generate_id (connection);

        xcb_create_window (connection,
                           XCB_COPY_FROM_PARENT,
                           window,
                           screen->root,
                           0, 0,
                           400, 400,
                           10,
                           XCB_WINDOW_CLASS_INPUT_OUTPUT,
                           screen->root_visual,
                           0, NULL );

	xcb_icccm_set_wm_client_machine(connection,
					window,
					XCB_ATOM_STRING,
					8,
					20,
					"external.example.com");

	xcb_ewmh_set_wm_name(&ewmh,
			     window,
			     5,
			     "Lorem");

        xcb_map_window (connection, window);

        xcb_flush (connection);

	sleep(5);

	xcb_ewmh_set_wm_name(&ewmh,
			     window,
			     5,
			     "Ipsum");

        xcb_flush (connection);

	sleep(5);

        xcb_disconnect (connection);

        return 0;
}
Comment 1 Git Bot editbugs 2019-09-22 18:45:29 CEST
Olivier Fourdan referenced this bugreport in commit 5ea89cb90e0e82cbb133fe01b29a1c2fc16e891a

client: Fix hostname not showing initially

https://git.xfce.org/xfce/xfwm4/commit?id=5ea89cb90e0e82cbb133fe01b29a1c2fc16e891a
Comment 2 Olivier Fourdan editbugs 2019-09-22 18:46:14 CEST
Thanks, that should fix it, if not, please reopen.
Comment 3 Git Bot editbugs 2020-04-11 17:58:57 CEST
Olivier Fourdan referenced this bugreport in commit faa51724b863ad3218b90d37194fe8844b573d77

client: Fix hostname not showing initially

https://git.xfce.org/xfce/xfwm4/commit?id=faa51724b863ad3218b90d37194fe8844b573d77

Bug #15984

Reported by:
Sam Varshavchik
Reported on: 2019-09-22
Last modified on: 2020-04-11

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information