mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: support dip <-> screen conversion on Linux X11 (#46895)
feat: support dip <-> screen conversion on Linux Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
17
shell/browser/linux/x11_util.cc
Normal file
17
shell/browser/linux/x11_util.cc
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2025 Microsoft GmbH.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/linux/x11_util.h"
|
||||
|
||||
#include "ui/ozone/public/ozone_platform.h"
|
||||
|
||||
namespace x11_util {
|
||||
|
||||
bool IsX11() {
|
||||
return ui::OzonePlatform::GetInstance()
|
||||
->GetPlatformProperties()
|
||||
.electron_can_call_x11;
|
||||
}
|
||||
|
||||
} // namespace x11_util
|
||||
14
shell/browser/linux/x11_util.h
Normal file
14
shell/browser/linux/x11_util.h
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2025 Microsoft GmbH.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_LINUX_X11_UTIL_H_
|
||||
#define ELECTRON_SHELL_BROWSER_LINUX_X11_UTIL_H_
|
||||
|
||||
namespace x11_util {
|
||||
|
||||
bool IsX11();
|
||||
|
||||
} // namespace x11_util
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_LINUX_X11_UTIL_H_
|
||||
Reference in New Issue
Block a user