diff --git a/pointer_input.cpp b/pointer_input.cpp --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -21,6 +21,7 @@ #include "platform.h" #include "effects.h" #include "input_event.h" +#include "osd.h" #include "screens.h" #include "shell_client.h" #include "wayland_cursor_theme.h" @@ -41,6 +42,8 @@ // screenlocker #include +#include + #include #include // Wayland @@ -596,7 +599,9 @@ } } ); - // TODO: show notification + OSD::show(i18nc("notification about mouse pointer confined", + "Pointer motion confined to the current window.\nTo release pointer hold Escape for 3 seconds."), + QStringLiteral("preferences-desktop-mouse"), 5000); return; } } else { @@ -611,7 +616,9 @@ if (r.contains(m_pos.toPoint())) { lock->setLocked(true); m_locked = true; - // TODO: show notification + OSD::show(i18nc("notification about mouse pointer locked", + "Pointer locked to current position.\nTo end pointer lock hold Escape for 3 seconds."), + QStringLiteral("preferences-desktop-mouse"), 5000); // TODO: connect to region change - is it needed at all? If the pointer is locked it's always in the region } }