Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 671029 Details for
Bug 749828
www-client/chromium-86.0.4240.75: use the wrong cursors theme
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
chromium-87-obtain-xcursor-path-from-libxcursor.patch
chromium-87-obtain-xcursor-path-from-libxcursor.patch (text/plain), 2.70 KB, created by
David
on 2020-11-12 15:20:00 UTC
(
hide
)
Description:
chromium-87-obtain-xcursor-path-from-libxcursor.patch
Filename:
MIME Type:
Creator:
David
Created:
2020-11-12 15:20:00 UTC
Size:
2.70 KB
patch
obsolete
>From ad63f7bca1ec2e61130e0d295124ab896c016e96 Mon Sep 17 00:00:00 2001 >From: Tom Anderson <thomasanderson@chromium.org> >Date: Tue, 15 Sep 2020 20:17:27 +0000 >Subject: [PATCH] [XProto] Obtain Xcursor path from libXcursor > >Some distros (eg. Gentoo) use a non-default libXcursor path, so the >path (which was previously hardcoded) must now be obtained from >libXcursor. This patch uses dlopen()/dlsym() to get the path when >available. > >BUG=1127712 >R=sky > >Change-Id: Ib99dff0448c521c1a6cf8ad03bfe981572b9627c >Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410305 >Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> >Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> >Reviewed-by: Scott Violet <sky@chromium.org> >Cr-Commit-Position: refs/heads/master@{#807158} >--- > >diff -dNur a/ui/base/x/x11_cursor_loader.cc b/ui/base/x/x11_cursor_loader.cc >--- a/ui/base/x/x11_cursor_loader.cc 2020-11-11 19:26:46.579401514 +0100 >+++ b/ui/base/x/x11_cursor_loader.cc 2020-11-11 19:26:31.823318111 +0100 >@@ -4,6 +4,8 @@ > > #include "ui/base/x/x11_cursor_loader.h" > >+#include <dlfcn.h> >+ > #include <limits> > #include <string> > >@@ -13,6 +15,7 @@ > #include "base/files/file_util.h" > #include "base/memory/ref_counted_memory.h" > #include "base/memory/scoped_refptr.h" >+#include "base/no_destructor.h" > #include "base/sequence_checker.h" > #include "base/stl_util.h" > #include "base/strings/string_number_conversions.h" >@@ -28,6 +31,10 @@ > #include "ui/gfx/x/connection.h" > #include "ui/gfx/x/xproto.h" > >+extern "C" { >+const char* XcursorLibraryPath(void); >+} >+ > namespace ui { > > namespace { >@@ -120,13 +127,40 @@ > return value; > } > >-std::string CursorPath() { >+std::string CursorPathFromLibXcursor() { >+ struct DlCloser { >+ void operator()(void* ptr) const { dlclose(ptr); } >+ }; >+ >+ std::unique_ptr<void, DlCloser> lib(dlopen("libXcursor.so.1", RTLD_LAZY)); >+ if (!lib) >+ return ""; >+ >+ if (auto* sym = reinterpret_cast<decltype(&XcursorLibraryPath)>( >+ dlsym(lib.get(), "XcursorLibraryPath"))) { >+ if (const char* path = sym()) >+ return path; >+ } >+ return ""; >+} >+ >+std::string CursorPathImpl() { > constexpr const char kDefaultPath[] = > "~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons"; >+ >+ auto libxcursor_path = CursorPathFromLibXcursor(); >+ if (!libxcursor_path.empty()) >+ return libxcursor_path; >+ > std::string path = GetEnv("XCURSOR_PATH"); > return path.empty() ? kDefaultPath : path; > } > >+const std::string& CursorPath() { >+ static base::NoDestructor<std::string> path(CursorPathImpl()); >+ return *path; >+} >+ > x11::Render::PictFormat GetRenderARGBFormat( > const x11::Render::QueryPictFormatsReply& formats) { > for (const auto& format : formats.formats) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 749828
: 671029