зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1791417 [Wayland] Don't advertise selection clipboard support if it's disabled r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D198141
This commit is contained in:
Родитель
e61f02bed5
Коммит
7f13f18df6
|
@ -14,6 +14,7 @@
|
||||||
#endif
|
#endif
|
||||||
#if defined(MOZ_WAYLAND)
|
#if defined(MOZ_WAYLAND)
|
||||||
# include "nsClipboardWayland.h"
|
# include "nsClipboardWayland.h"
|
||||||
|
# include "nsWaylandDisplay.h"
|
||||||
#endif
|
#endif
|
||||||
#include "nsGtkUtils.h"
|
#include "nsGtkUtils.h"
|
||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
|
@ -194,7 +195,13 @@ nsRetrievalContext::~nsRetrievalContext() {
|
||||||
|
|
||||||
nsClipboard::nsClipboard()
|
nsClipboard::nsClipboard()
|
||||||
: nsBaseClipboard(mozilla::dom::ClipboardCapabilities(
|
: nsBaseClipboard(mozilla::dom::ClipboardCapabilities(
|
||||||
true /* supportsSelectionClipboard */,
|
#ifdef MOZ_WAYLAND
|
||||||
|
widget::GdkIsWaylandDisplay()
|
||||||
|
? widget::WaylandDisplayGet()->IsPrimarySelectionEnabled()
|
||||||
|
: true,
|
||||||
|
#else
|
||||||
|
true, /* supportsSelectionClipboard */
|
||||||
|
#endif
|
||||||
false /* supportsFindClipboard */,
|
false /* supportsFindClipboard */,
|
||||||
false /* supportsSelectionCache */)) {
|
false /* supportsSelectionCache */)) {
|
||||||
g_signal_connect(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), "owner-change",
|
g_signal_connect(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), "owner-change",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче