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

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

Issue 8595003: Have panels respond to changes in work area on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 return monitor_rect.x == window_rect.x() && 802 return monitor_rect.x == window_rect.x() &&
803 monitor_rect.y == window_rect.y() && 803 monitor_rect.y == window_rect.y() &&
804 monitor_rect.width == window_rect.width() && 804 monitor_rect.width == window_rect.width() &&
805 monitor_rect.height == window_rect.height(); 805 monitor_rect.height == window_rect.height();
806 #else 806 #else
807 NOTIMPLEMENTED(); 807 NOTIMPLEMENTED();
808 return false; 808 return false;
809 #endif 809 #endif
810 } 810 }
811 811
812 Atom GetAtomForScreenProperty(const char* atom_name) {
813 GdkAtom gdk_atom = gdk_atom_intern_static_string(atom_name);
814 return gdk_x11_atom_to_xatom_for_display(
sadrul 2011/11/18 17:56:42 Please use non-gtk functions (e.g. XInternAtom)
prasadt 2011/11/18 22:31:42 Done. As it turns, there is an existing helper fu
815 gdk_screen_get_display(gdk_screen_get_default()), gdk_atom);
816 }
817
812 // ---------------------------------------------------------------------------- 818 // ----------------------------------------------------------------------------
813 // These functions are declared in x11_util_internal.h because they require 819 // These functions are declared in x11_util_internal.h because they require
814 // XLib.h to be included, and it conflicts with many other headers. 820 // XLib.h to be included, and it conflicts with many other headers.
815 XRenderPictFormat* GetRenderARGB32Format(Display* dpy) { 821 XRenderPictFormat* GetRenderARGB32Format(Display* dpy) {
816 static XRenderPictFormat* pictformat = NULL; 822 static XRenderPictFormat* pictformat = NULL;
817 if (pictformat) 823 if (pictformat)
818 return pictformat; 824 return pictformat;
819 825
820 // First look for a 32-bit format which ignores the alpha value 826 // First look for a 32-bit format which ignores the alpha value
821 XRenderPictFormat templ; 827 XRenderPictFormat templ;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 << "request_code " << static_cast<int>(error_event.request_code) << ", " 938 << "request_code " << static_cast<int>(error_event.request_code) << ", "
933 << "minor_code " << static_cast<int>(error_event.minor_code) 939 << "minor_code " << static_cast<int>(error_event.minor_code)
934 << " (" << request_str << ")"; 940 << " (" << request_str << ")";
935 } 941 }
936 942
937 // ---------------------------------------------------------------------------- 943 // ----------------------------------------------------------------------------
938 // End of x11_util_internal.h 944 // End of x11_util_internal.h
939 945
940 946
941 } // namespace ui 947 } // namespace ui
OLDNEW
« ui/base/x/work_area_watcher_x.h ('K') | « ui/base/x/x11_util.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698