diff options
Diffstat (limited to 'src/ws.c')
-rw-r--r-- | src/ws.c | 38 |
1 files changed, 25 insertions, 13 deletions
@@ -237,15 +237,20 @@ wsPreInit12(InputDriverPtr drv, InputInfoPtr pInfo, int flags) buttons_from = X_CONFIG; } - priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", 0); - xf86Msg(X_CONFIG, "%s associated screen: %d\n", - pInfo->name, priv->screen_no); - if (priv->screen_no >= screenInfo.numScreens || - priv->screen_no < 0) { - priv->screen_no = 0; + priv->screen_no = xf86SetIntOption(pInfo->options, "ScreenNo", -1); + if (priv->screen_no != -1) { + if (priv->screen_no >= screenInfo.numScreens || + priv->screen_no < 0) { + priv->screen_no = 0; + } + xf86Msg(X_CONFIG, "%s associated screen: %d\n", + pInfo->name, priv->screen_no); + } + + priv->rroutput = xf86SetStrOption(pInfo->options, "Output", NULL); + if (priv->rroutput) { + wsRandRGetInfo(pInfo, priv->rroutput); } - - priv->swap_axes = xf86SetBoolOption(pInfo->options, "SwapXY", 0); if (priv->swap_axes) { xf86Msg(X_CONFIG, @@ -317,11 +322,18 @@ wsPreInit12(InputDriverPtr drv, InputInfoPtr pInfo, int flags) priv->min_y = priv->coords.miny; priv->max_y = priv->coords.maxy; } else { - /* in calibrated mode, coordinate space, is screen coords */ - priv->min_x = 0; - priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; - priv->min_y = 0; - priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; + if (priv->screen_no != -1) { + /* in calibrated mode, coordinate space, is screen coords */ + priv->min_x = 0; + priv->max_x = screenInfo.screens[priv->screen_no]->width - 1; + priv->min_y = 0; + priv->max_y = screenInfo.screens[priv->screen_no]->height - 1; + } else { + priv->min_x = -1; + priv->max_x = -1; + priv->min_y = -1; + priv->max_y = -1; + } } /* Allow options to override this */ priv->min_x = xf86SetIntOption(pInfo->options, "MinX", priv->min_x); |