[weston 0/8] Implement NET_WM_SYNC_REQUEST basic support

Olivier Fourdan ofourdan at redhat.com
Mon Apr 24 14:17:19 UTC 2017


Hi,

Sorry, I missed a couple more questions...

You may want to remove the log each time a sync notify is received before landing the patch:

> +static void
> +weston_wm_handle_sync_alarm_notify(struct weston_wm *wm,
> +				   xcb_generic_event_t *event)
> +{
> +	xcb_sync_alarm_notify_event_t *alarm_event =
> +		(xcb_sync_alarm_notify_event_t *) event;
> +	struct weston_wm_window *window;
> +	int64_t counter_value = 0;
> +
> +	counter_value = alarm_event->counter_value.lo;
> +	counter_value += (int64_t) alarm_event->counter_value.hi << 32;
> +
> +	weston_log("XCB_SYNC_ALARM_NOTIFY (alarm %d counter_value %li)\n",
> +	           alarm_event->alarm, counter_value);
> +

Here ^^^ that makes weston very verbose while resizing windows...

Couple if questions, not that important, just trying to understand:

>  static void
> +weston_wm_window_create_sync_alarm(struct weston_wm_window *window)
> +{
> +	struct weston_wm *wm = window->wm;
> +	xcb_sync_int64_t value;
> +	uint32_t mask;
> +	xcb_sync_create_alarm_value_list_t value_list;
> +
> +	if (window->sync_request_counter == 0) {
> +		weston_log("NET_WM_SYNC_REQUEST isn't supported by the client\n");
> +		return;
> +	}

In which case can we call weston_wm_window_create_sync_alarm() with sync_request_counter == 0 ?

> +
> +	if (window->sync_request_alarm != 0) {
> +		weston_log("Sync request alarm has already been created\n");
> +		return;
> +	}

Similarly, can this actually happen? the alarm gets created on map request and destroy on unmap notify.

Cheers,
Olivier


More information about the wayland-devel mailing list