Merge branch 'fix-per-window-dpi' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-per-window-dpi
# Conflicts: # Source/Editor/Utilities/Utils.cs # Source/Editor/Windows/Assets/MaterialWindow.cs # Source/Editor/Windows/Assets/ParticleEmitterWindow.cs # Source/Engine/Platform/Linux/LinuxWindow.cpp # Source/Engine/Platform/Windows/WindowsWindow.cpp
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#define _NET_WM_STATE_REMOVE 0L // remove/unset property
|
||||
#define _NET_WM_STATE_ADD 1L // add/set property
|
||||
#define _NET_WM_STATE_TOGGLE 2L // toggle property
|
||||
#define DefaultDPI 96
|
||||
|
||||
// Window routines function prolog
|
||||
#define LINUX_WINDOW_PROLOG X11::Display* display = (X11::Display*)LinuxPlatform::GetXDisplay(); X11::Window window = (X11::Window)_window
|
||||
@@ -150,7 +151,10 @@ LinuxWindow::LinuxWindow(const CreateWindowSettings& settings)
|
||||
X11::XSetTransientForHint(display, window, (X11::Window)((LinuxWindow*)settings.Parent)->GetNativePtr());
|
||||
}
|
||||
|
||||
// Set events mask
|
||||
_dpi = Platform::GetDpi();
|
||||
_dpiScale = (float)_dpi / (float)DefaultDPI;
|
||||
|
||||
// Set input mask
|
||||
long eventMask =
|
||||
ExposureMask | FocusChangeMask |
|
||||
KeyPressMask | KeyReleaseMask |
|
||||
|
||||
Reference in New Issue
Block a user