[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmplayer/0.12] src: Lets not xcb_discard_reply for void functions
From:       Koos Vriezen <koos.vriezen () gmail ! com>
Date:       2016-10-30 11:54:49
Message-ID: E1c0ohN-0004GI-4S () code ! kde ! org
[Download RAW message or body]

Git commit 7cfb5099f78596280ec83c8a99291f21dbc73006 by Koos Vriezen.
Committed on 30/10/2016 at 11:53.
Pushed by vriezen into branch '0.12'.

Lets not xcb_discard_reply for void functions

Doesn't look to be done elsewhere, but didnt really find docu about it.

M  +7    -8    src/viewarea.cpp

http://commits.kde.org/kmplayer/7cfb5099f78596280ec83c8a99291f21dbc73006

diff --git a/src/viewarea.cpp b/src/viewarea.cpp
index e4df941..e407c95 100644
--- a/src/viewarea.cpp
+++ b/src/viewarea.cpp
@@ -1762,7 +1762,7 @@ public:
         destroyBackingStore ();
         if (gc) {
             xcb_connection_t* connection = QX11Info::connection();
-            xcb_discard_reply(connection, xcb_free_gc(connection, gc).sequence);
+            xcb_free_gc(connection, gc);
         }
     }
     void clearSurface (Surface *s) {
@@ -1810,12 +1810,12 @@ public:
             gc = xcb_generate_id(connection);
             uint32_t values[] = { XCB_GX_COPY, XCB_FILL_STYLE_SOLID,
                 XCB_SUBWINDOW_MODE_CLIP_BY_CHILDREN, 0 };
-            xcb_discard_reply(connection, xcb_create_gc(connection, gc, backing_store,
+            xcb_create_gc(connection, gc, backing_store,
                     XCB_GC_FUNCTION | XCB_GC_FILL_STYLE |
-                    XCB_GC_SUBWINDOW_MODE | XCB_GC_GRAPHICS_EXPOSURES, values).sequence);
+                    XCB_GC_SUBWINDOW_MODE | XCB_GC_GRAPHICS_EXPOSURES, values);
         }
-        xcb_discard_reply(connection, xcb_copy_area(connection, backing_store, m_view_area->winId(),
-                gc, sr.x(), sr.y(), dx, dy, sr.width (), sr.height ()).sequence);
+        xcb_copy_area(connection, backing_store, m_view_area->winId(),
+                gc, sr.x(), sr.y(), dx, dy, sr.width (), sr.height ());
         xcb_flush(connection);
     }
 #endif
@@ -1823,7 +1823,7 @@ public:
 #ifdef KMPLAYER_WITH_CAIRO
         if (backing_store) {
             xcb_connection_t* connection = QX11Info::connection();
-            xcb_discard_reply(connection, xcb_free_pixmap(connection, backing_store).sequence);
+            xcb_free_pixmap(connection, backing_store);
         }
 #endif
         backing_store = 0;
@@ -2391,8 +2391,7 @@ void ViewArea::setVideoWidgetVisible (bool show) {
 static void setXSelectInput(WId wid, uint32_t mask) {
     xcb_connection_t* connection = QX11Info::connection();
     const uint32_t values[] = { mask };
-    xcb_void_cookie_t cookie = xcb_change_window_attributes(connection, wid, XCB_CW_EVENT_MASK, values);
-    xcb_discard_reply(connection, cookie.sequence);
+    xcb_change_window_attributes(connection, wid, XCB_CW_EVENT_MASK, values);
     xcb_query_tree_cookie_t biscuit = xcb_query_tree(connection, wid);
     xcb_query_tree_reply_t *reply = xcb_query_tree_reply(connection, biscuit, NULL);
     if (reply) {
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic