From: John Wolfe Date: Fri, 7 Aug 2020 19:03:26 +0000 (-0700) Subject: Backout the previous common souce file changes. X-Git-Tag: stable-11.2.0~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e653c935977b511470fafccb3cddcdb566df85;p=thirdparty%2Fopen-vm-tools.git Backout the previous common souce file changes. --- diff --git a/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc b/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc index 66565f146..3fad2ce31 100644 --- a/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc +++ b/open-vm-tools/services/plugins/dndcp/xutils/xutils.cc @@ -249,7 +249,7 @@ GetCardinal(Glib::RefPtr window, // IN: Window bool GetCardinalList(Glib::RefPtr window, // IN: Window const utf::string& atomName, // IN: Atom name - std::vector& retValues) // IN: Return values + std::vector& retValues) // IN: Return values { ASSERT(window); ASSERT(window->get_display()); @@ -306,58 +306,6 @@ GetCardinalList(Glib::RefPtr window, // IN: Window } -/* - *----------------------------------------------------------------------------- - * - * xutils::CheckDockPanel -- - * - * Utility function to check dock or panel window. - * - * Results: - * true if the dock or panel window found. - * Otherwise false. - * - * Side effects: - * None. - * - *----------------------------------------------------------------------------- - */ -bool CheckDockPanel(Glib::RefPtr window) -{ - ASSERT(window); - ASSERT(window->get_display()); - - GdkDisplay* display = const_cast(window->get_display()->gobj()); - GdkWindow* gdkwin = const_cast(window->gobj()); - - Atom atom = gdk_x11_get_xatom_by_name_for_display(display, "_NET_WM_WINDOW_TYPE"); - Atom type; - int format; - ulong nitems; - ulong bytes_after; - uint8* values; - - gdk_error_trap_push(); - int ret = XGetWindowProperty(GDK_DISPLAY_XDISPLAY(display), - GDK_WINDOW_XID(gdkwin), - atom, 0, G_MAXLONG, False, AnyPropertyType, &type, - &format, &nitems, &bytes_after, &values); - gdk_error_trap_pop_ignored(); - if (ret == Success && type == XA_ATOM - && format == 32 && values != NULL && nitems > 0) { - unsigned long* stack = (unsigned long*)values; - if (stack[0] == XInternAtom(GDK_DISPLAY_XDISPLAY(display), - "_NET_WM_WINDOW_TYPE_DOCK", false)) { - Log("found dock window: %ld.\n",GDK_WINDOW_XID(gdkwin)); - XFree(values); - return true; - } - } - XFree(values); - return false; -} - - /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh b/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh index 42beab6b8..29d69003f 100644 --- a/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh +++ b/open-vm-tools/services/plugins/dndcp/xutils/xutils.hh @@ -41,7 +41,6 @@ bool GetCardinal(Glib::RefPtr window, bool GetCardinalList(Glib::RefPtr window, const utf::string& atomName, std::vector& retValues); -bool CheckDockPanel(Glib::RefPtr window); /* * Utility functions for virtual desktops.