Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ui/base/x/selection_owner.cc

Issue 697863002: Pass in long to XChangeProperty() instead of an int when using format=32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/x/selection_owner.h" 5 #include "ui/base/x/selection_owner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 targets.size()); 240 targets.size());
241 return true; 241 return true;
242 } else { 242 } else {
243 // Try to find the data type in map. 243 // Try to find the data type in map.
244 SelectionFormatMap::const_iterator it = format_map_.find(target); 244 SelectionFormatMap::const_iterator it = format_map_.find(target);
245 if (it != format_map_.end()) { 245 if (it != format_map_.end()) {
246 if (it->second->size() > max_request_size_) { 246 if (it->second->size() > max_request_size_) {
247 // We must send the data back in several chunks due to a limitation in 247 // We must send the data back in several chunks due to a limitation in
248 // the size of X requests. Notify the selection requestor that the data 248 // the size of X requests. Notify the selection requestor that the data
249 // will be sent incrementally by returning data of type "INCR". 249 // will be sent incrementally by returning data of type "INCR".
250 int length = it->second->size(); 250 long length = it->second->size();
251 XChangeProperty(x_display_, 251 XChangeProperty(x_display_,
252 requestor, 252 requestor,
253 property, 253 property,
254 atom_cache_.GetAtom(kIncr), 254 atom_cache_.GetAtom(kIncr),
255 32, 255 32,
256 PropModeReplace, 256 PropModeReplace,
257 reinterpret_cast<unsigned char*>(&length), 257 reinterpret_cast<unsigned char*>(&length),
258 1); 258 1);
259 259
260 // Wait for the selection requestor to indicate that it has processed 260 // Wait for the selection requestor to indicate that it has processed
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 data(data), 375 data(data),
376 offset(offset), 376 offset(offset),
377 timeout(timeout), 377 timeout(timeout),
378 foreign_window_manager_id(foreign_window_manager_id) { 378 foreign_window_manager_id(foreign_window_manager_id) {
379 } 379 }
380 380
381 SelectionOwner::IncrementalTransfer::~IncrementalTransfer() { 381 SelectionOwner::IncrementalTransfer::~IncrementalTransfer() {
382 } 382 }
383 383
384 } // namespace ui 384 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698