mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add a function for getting the active modifiers
This commit is contained in:
@@ -263,6 +263,14 @@ class Editor {
|
||||
const bool use_xembed;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Get the X11 event mask containing the current keyboard modifiers. Because
|
||||
* we don't want to link with `xcb-xkb` and we also can't really use
|
||||
* key/motion events for this, we'll do this by querying the pointer
|
||||
* position instead. Will return a nullopt if that query fails.
|
||||
*/
|
||||
std::optional<uint16_t> get_active_modifiers() const noexcept;
|
||||
|
||||
/**
|
||||
* Get the current cursor position, in Win32 screen coordinates. This is
|
||||
* needed for our `LeaveNotify` handling because `GetCursorPos()` only
|
||||
@@ -273,7 +281,7 @@ class Editor {
|
||||
*
|
||||
* If we cannot obtain the X11 cursor position, then this returns a nullopt.
|
||||
*/
|
||||
std::optional<POINT> get_current_pointer_position() const;
|
||||
std::optional<POINT> get_current_pointer_position() const noexcept;
|
||||
|
||||
/**
|
||||
* Returns `true` if the currently active window (as per
|
||||
|
||||
Reference in New Issue
Block a user