summaryrefslogtreecommitdiffstats
path: root/ui/base/x/x11_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/base/x/x11_util.cc')
-rw-r--r--ui/base/x/x11_util.cc51
1 files changed, 0 insertions, 51 deletions
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index 668c787..0f16be7 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -61,13 +61,6 @@
#include "ui/gfx/skia_util.h"
#endif
-#if defined(TOOLKIT_GTK)
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-#include "ui/gfx/gdk_compat.h"
-#include "ui/gfx/gtk_compat.h"
-#endif
-
namespace ui {
namespace {
@@ -530,33 +523,6 @@ bool GetCurrentDesktop(int* desktop) {
return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop);
}
-#if defined(TOOLKIT_GTK)
-XID GetX11WindowFromGtkWidget(GtkWidget* widget) {
- return GDK_WINDOW_XID(gtk_widget_get_window(widget));
-}
-
-XID GetX11WindowFromGdkWindow(GdkWindow* window) {
- return GDK_WINDOW_XID(window);
-}
-
-GtkWindow* GetGtkWindowFromX11Window(XID xid) {
- GdkWindow* gdk_window =
- gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid);
- if (!gdk_window)
- return NULL;
- GtkWindow* gtk_window = NULL;
- gdk_window_get_user_data(gdk_window,
- reinterpret_cast<gpointer*>(&gtk_window));
- if (!gtk_window)
- return NULL;
- return gtk_window;
-}
-
-void* GetVisualFromGtkWidget(GtkWidget* widget) {
- return GDK_VISUAL_XVISUAL(gtk_widget_get_visual(widget));
-}
-#endif // defined(TOOLKIT_GTK)
-
void SetHideTitlebarWhenMaximizedProperty(XID window,
HideTitlebarWhenMaximized property) {
// XChangeProperty() expects "hide" to be long.
@@ -973,13 +939,8 @@ bool SetStringProperty(XID window,
}
Atom GetAtom(const char* name) {
-#if defined(TOOLKIT_GTK)
- return gdk_x11_get_xatom_by_name_for_display(
- gdk_display_get_default(), name);
-#else
// TODO(derat): Cache atoms to avoid round-trips to the server.
return XInternAtom(gfx::GetXDisplay(), name, false);
-#endif
}
void SetWindowClassHint(XDisplay* display,
@@ -1394,17 +1355,6 @@ bool IsX11WindowFullScreen(XID window) {
if (!ui::GetWindowRect(window, &window_rect))
return false;
-#if defined(TOOLKIT_GTK)
- // As the last resort, check if the window size is as large as the main
- // screen.
- GdkRectangle monitor_rect;
- gdk_screen_get_monitor_geometry(gdk_screen_get_default(), 0, &monitor_rect);
-
- return monitor_rect.x == window_rect.x() &&
- monitor_rect.y == window_rect.y() &&
- monitor_rect.width == window_rect.width() &&
- monitor_rect.height == window_rect.height();
-#else
// We can't use gfx::Screen here because we don't have an aura::Window. So
// instead just look at the size of the default display.
//
@@ -1415,7 +1365,6 @@ bool IsX11WindowFullScreen(XID window) {
int width = WidthOfScreen(screen);
int height = HeightOfScreen(screen);
return window_rect.size() == gfx::Size(width, height);
-#endif
}
const unsigned char* XRefcountedMemory::front() const {