summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2015-07-10 18:13:48 -0700
committerBryce Harrington <bryce@osg.samsung.com>2015-07-10 18:13:48 -0700
commitda41b5739df1a9768a97c77d80a8d9c513a2bd6f (patch)
treed089433f99268805d640be92162c524860f2ddbc /xwayland
parentb2d79d504efaab06088a011bf25c9affe1dbc3d1 (diff)
downloadweston-da41b5739df1a9768a97c77d80a8d9c513a2bd6f.tar.gz
xwayland: Allow dump_property when selection fails
dump_property allows reply to be NULL. Calling it unconditionally will ensure user knows where the selection failed. Also refactor code a bit. Suggested by Marek Chalupa
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/selection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xwayland/selection.c b/xwayland/selection.c
index 2f60c0ec..452cd69d 100644
--- a/xwayland/selection.c
+++ b/xwayland/selection.c
@@ -240,14 +240,14 @@ weston_wm_get_selection_data(struct weston_wm *wm)
0x1fffffff /* length */);
reply = xcb_get_property_reply(wm->conn, cookie, NULL);
- if (reply == NULL)
- return;
- if (reply->type == wm->atom.incr) {
- dump_property(wm, wm->atom.wl_selection, reply);
+ dump_property(wm, wm->atom.wl_selection, reply);
+
+ if (reply == NULL) {
+ return;
+ } else if (reply->type == wm->atom.incr) {
wm->incr = 1;
} else {
- dump_property(wm, wm->atom.wl_selection, reply);
wm->incr = 0;
weston_wm_write_property(wm, reply);
}