diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-16 10:22:07 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-16 10:22:07 +0800 |
| commit | d7fbe9332f01153efaea40e7a35f0025c75b9a04 (patch) | |
| tree | 83cace7d4edba6453ed4749efa96921272085796 /src/platform/gui/xcb/Input.cpp | |
| parent | 246eb9266b9349b44cbe96f3f839124ab30cbb89 (diff) | |
| download | cru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.tar.gz cru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.tar.bz2 cru-d7fbe9332f01153efaea40e7a35f0025c75b9a04.zip | |
Abstract out AutoDestruct.
Diffstat (limited to 'src/platform/gui/xcb/Input.cpp')
| -rw-r--r-- | src/platform/gui/xcb/Input.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platform/gui/xcb/Input.cpp b/src/platform/gui/xcb/Input.cpp index 3482d3ab..a07697ae 100644 --- a/src/platform/gui/xcb/Input.cpp +++ b/src/platform/gui/xcb/Input.cpp @@ -84,7 +84,7 @@ std::vector<xcb_keysym_t> XorgKeycodeToKeysyms(XcbUiApplication *application, // Get keyboard mapping auto mapping_cookie = xcb_get_keyboard_mapping(connection, keycode, 1); - auto mapping_reply = FreeLater( + auto mapping_reply = AutoFreePtr( xcb_get_keyboard_mapping_reply(connection, mapping_cookie, NULL)); if (!mapping_reply) { @@ -121,7 +121,7 @@ using KeymapBitset = KeymapBitset GetXorgKeymap(xcb_connection_t *connection) { auto keymap_cookie = xcb_query_keymap(connection); auto keymap_reply = - FreeLater(xcb_query_keymap_reply(connection, keymap_cookie, NULL)); + AutoFreePtr(xcb_query_keymap_reply(connection, keymap_cookie, NULL)); if (!keymap_reply) { throw XcbException("Cannot get keymap."); @@ -150,7 +150,7 @@ std::unordered_map<KeyCode, bool> GetKeyboardState( // Get keyboard mapping auto mapping_cookie = xcb_get_keyboard_mapping(connection, min_keycode, max_keycode - min_keycode + 1); - auto mapping_reply = FreeLater( + auto mapping_reply = AutoFreePtr( xcb_get_keyboard_mapping_reply(connection, mapping_cookie, NULL)); if (!mapping_reply) { |
