fix: position window titlebar buttons correctly in Ubuntu on Wayland (#48603)
fix: position window titlebar buttons correctly in Ubuntu on Wayland (#48490) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
This commit is contained in:
parent
6e61de6878
commit
d801ecbdd7
4 changed files with 8 additions and 43 deletions
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "base/cancelable_callback.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/containers/map_util.h"
|
||||
#include "base/environment.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/files/scoped_file.h"
|
||||
|
|
@ -59,8 +58,6 @@ const char kFreedesktopPortalName[] = "org.freedesktop.portal.Desktop";
|
|||
const char kFreedesktopPortalPath[] = "/org/freedesktop/portal/desktop";
|
||||
const char kFreedesktopPortalOpenURI[] = "org.freedesktop.portal.OpenURI";
|
||||
|
||||
const char kOriginalXdgCurrentDesktopEnvVar[] = "ORIGINAL_XDG_CURRENT_DESKTOP";
|
||||
|
||||
const char kMethodOpenDirectory[] = "OpenDirectory";
|
||||
|
||||
class ShowItemHelper {
|
||||
|
|
@ -279,12 +276,6 @@ bool XDGUtil(const std::vector<std::string>& argv,
|
|||
base::nix::CreateLaunchOptionsWithXdgActivation(base::BindOnce(
|
||||
[](base::RepeatingClosure quit_loop, base::LaunchOptions* options_out,
|
||||
base::LaunchOptions options) {
|
||||
// Correct the XDG_CURRENT_DESKTOP environment variable before calling
|
||||
// XDG, in case it was changed for compatibility.
|
||||
if (const auto* orig = base::FindOrNull(
|
||||
options.environment, kOriginalXdgCurrentDesktopEnvVar))
|
||||
options.environment.emplace(base::nix::kXdgCurrentDesktopEnvVar,
|
||||
*orig);
|
||||
*options_out = std::move(options);
|
||||
std::move(quit_loop).Run();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue