mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
gtk-primary-selection: warn when offering MIME type after set_selection
This commit is contained in:
parent
8c573bc7c6
commit
c2113decb3
1 changed files with 5 additions and 0 deletions
|
@ -98,6 +98,7 @@ static void destroy_offer(struct wl_resource *resource) {
|
||||||
struct client_data_source {
|
struct client_data_source {
|
||||||
struct wlr_primary_selection_source source;
|
struct wlr_primary_selection_source source;
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
|
bool finalized;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void client_source_send(
|
static void client_source_send(
|
||||||
|
@ -138,6 +139,9 @@ static void source_handle_offer(struct wl_client *client,
|
||||||
if (source == NULL) {
|
if (source == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (source->finalized) {
|
||||||
|
wlr_log(WLR_DEBUG, "Offering additional MIME type after set_selection");
|
||||||
|
}
|
||||||
|
|
||||||
char *dup_mime_type = strdup(mime_type);
|
char *dup_mime_type = strdup(mime_type);
|
||||||
if (dup_mime_type == NULL) {
|
if (dup_mime_type == NULL) {
|
||||||
|
@ -200,6 +204,7 @@ static void device_handle_set_selection(struct wl_client *client,
|
||||||
|
|
||||||
struct wlr_primary_selection_source *source = NULL;
|
struct wlr_primary_selection_source *source = NULL;
|
||||||
if (client_source != NULL) {
|
if (client_source != NULL) {
|
||||||
|
client_source->finalized = true;
|
||||||
source = &client_source->source;
|
source = &client_source->source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue