Commit 08978b76 authored by Roman Gilg's avatar Roman Gilg
Browse files

Add option for backwards compatibility

parent 61f2604e
Pipeline #15567 passed with stages
in 1 minute and 17 seconds
...@@ -287,8 +287,10 @@ output_calc_global_scale( struct xwl_screen *xwl_screen) ...@@ -287,8 +287,10 @@ output_calc_global_scale( struct xwl_screen *xwl_screen)
struct xwl_output *it; struct xwl_output *it;
int32_t scale = 1; int32_t scale = 1;
if (!xwl_screen->multidpi)
return;
if (!xwl_screen->xdg_output_manager) if (!xwl_screen->xdg_output_manager)
// global scaling is only possible when logical sizes are available // multi dpi scaling is only possible when logical sizes are available
return; return;
xorg_list_for_each_entry(it, &xwl_screen->output_list, link) { xorg_list_for_each_entry(it, &xwl_screen->output_list, link) {
......
...@@ -91,6 +91,7 @@ ddxUseMsg(void) ...@@ -91,6 +91,7 @@ ddxUseMsg(void)
ErrorF("-wm fd create X client for wm on given fd\n"); ErrorF("-wm fd create X client for wm on given fd\n");
ErrorF("-listen fd add give fd as a listen socket\n"); ErrorF("-listen fd add give fd as a listen socket\n");
ErrorF("-eglstream use eglstream backend for nvidia GPUs\n"); ErrorF("-eglstream use eglstream backend for nvidia GPUs\n");
ErrorF("-multidpi multi dpi emulation, requires wm support\n");
} }
static int wm_fd = -1; static int wm_fd = -1;
...@@ -125,6 +126,9 @@ ddxProcessArgument(int argc, char *argv[], int i) ...@@ -125,6 +126,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
else if (strcmp(argv[i], "-eglstream") == 0) { else if (strcmp(argv[i], "-eglstream") == 0) {
return 1; return 1;
} }
else if (strcmp(argv[i], "-multidpi") == 0) {
return 1;
}
return 0; return 0;
} }
...@@ -991,6 +995,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) ...@@ -991,6 +995,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
ErrorF("xwayland glamor: this build does not have EGLStream support\n"); ErrorF("xwayland glamor: this build does not have EGLStream support\n");
#endif #endif
} }
else if (strcmp(argv[i], "-multidpi") == 0) {
xwl_screen->multidpi = 1;
}
} }
#ifdef XWL_HAS_GLAMOR #ifdef XWL_HAS_GLAMOR
......
...@@ -123,6 +123,7 @@ struct xwl_screen { ...@@ -123,6 +123,7 @@ struct xwl_screen {
int rootless; int rootless;
int glamor; int glamor;
int present; int present;
int multidpi;
CreateScreenResourcesProcPtr CreateScreenResources; CreateScreenResourcesProcPtr CreateScreenResources;
CloseScreenProcPtr CloseScreen; CloseScreenProcPtr CloseScreen;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment