summaryrefslogtreecommitdiff
path: root/src/protocols/InputMethodV2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/InputMethodV2.cpp')
-rw-r--r--src/protocols/InputMethodV2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/InputMethodV2.cpp b/src/protocols/InputMethodV2.cpp
index 5d0bd417..24f7ad54 100644
--- a/src/protocols/InputMethodV2.cpp
+++ b/src/protocols/InputMethodV2.cpp
@@ -81,7 +81,7 @@ SP<CInputMethodV2> CInputMethodKeyboardGrabV2::getOwner() {
}
wl_client* CInputMethodKeyboardGrabV2::client() {
- return resource->client();
+ return resource->resource() ? resource->client() : nullptr;
}
CInputMethodPopupV2::CInputMethodPopupV2(SP<CZwpInputPopupSurfaceV2> resource_, SP<CInputMethodV2> owner_, SP<CWLSurfaceResource> surface) : resource(resource_), owner(owner_) {
@@ -373,4 +373,4 @@ void CInputMethodV2Protocol::onGetIME(CZwpInputMethodManagerV2* mgr, wl_resource
LOGM(LOG, "New IME with resource id {}", id);
events.newIME.emit(RESOURCE);
-} \ No newline at end of file
+}