mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Wayland: Remove error reporting of external bugs
Not sure that GLFW should be reporting that another client has made an
invalid receive request.
(cherry picked from commit 8d216054ad
)
This commit is contained in:
parent
4d68daedc9
commit
9e852ec39e
@ -1725,10 +1725,10 @@ static void dataSourceHandleSend(void* userData,
|
|||||||
const char* mimeType,
|
const char* mimeType,
|
||||||
int fd)
|
int fd)
|
||||||
{
|
{
|
||||||
if (_glfw.wl.selectionSource != source)
|
// Ignore it if this is an outdated or invalid request
|
||||||
|
if (_glfw.wl.selectionSource != source ||
|
||||||
|
strcmp(mimeType, "text/plain;charset=utf-8") != 0)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
||||||
"Wayland: Unknown clipboard data source");
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1742,14 +1742,6 @@ static void dataSourceHandleSend(void* userData,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(mimeType, "text/plain;charset=utf-8") != 0)
|
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
||||||
"Wayland: Wrong MIME type asked from clipboard");
|
|
||||||
close(fd);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t length = strlen(string);
|
size_t length = strlen(string);
|
||||||
|
|
||||||
while (length > 0)
|
while (length > 0)
|
||||||
@ -1779,11 +1771,7 @@ static void dataSourceHandleCancelled(void* userData,
|
|||||||
wl_data_source_destroy(source);
|
wl_data_source_destroy(source);
|
||||||
|
|
||||||
if (_glfw.wl.selectionSource != source)
|
if (_glfw.wl.selectionSource != source)
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
||||||
"Wayland: Unknown clipboard data source");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
_glfw.wl.selectionSource = NULL;
|
_glfw.wl.selectionSource = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user