diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 1186c059e..1dcfbfb55 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -223,7 +223,7 @@ ephyrMapFramebuffer(KdScreenInfo * screen) int buffer_height; EPHYR_LOG("screen->width: %d, screen->height: %d index=%d", - screen->width, screen->height, screen->mynum); + screen->width, screen->height, screen->pScreen->myNum); /* * Use the rotation last applied to ourselves (in the Xephyr case the fb @@ -785,8 +785,6 @@ ephyrInitScreen(ScreenPtr pScreen) KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; - EPHYR_LOG("pScreen->myNum:%d\n", pScreen->myNum); - hostx_set_screen_number(screen, pScreen->myNum); if (!EphyrHostGrabSet) { ephyrSetGrabShortcut("ctrl+shift"); } @@ -1046,7 +1044,7 @@ ephyrProcessMouseMotion(xcb_generic_event_t *xev) if (ephyrCursorScreen != screen->pScreen) { EPHYR_LOG("warping mouse cursor. " "cur_screen:%d, motion_screen:%d\n", - ephyrCursorScreen ? ephyrCursorScreen->myNum : -1, screen->pScreen->myNum); + ephyrCursorScreen ? ephyrCursorScreen->myNum: -1, screen->pScreen->myNum); ephyrWarpCursor(inputInfo.pointer, screen->pScreen, motion->event_x, motion->event_y); } @@ -1214,7 +1212,7 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev) xcb_ungrab_keyboard(conn, XCB_TIME_CURRENT_TIME); } else { - grabbed_screen = scrpriv->mynum; + grabbed_screen = screen->pScreen->myNum; } } } diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h index 59531f1a9..7538f9d8a 100644 --- a/hw/kdrive/ephyr/ephyr.h +++ b/hw/kdrive/ephyr/ephyr.h @@ -81,7 +81,6 @@ typedef struct _ephyrScrPriv { size_t shmsize; KdScreenInfo *screen; - int mynum; /* Screen number */ unsigned long cmap[256]; ScreenBlockHandlerProcPtr BlockHandler; diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index d1ac87912..b1532f246 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -150,7 +150,7 @@ processScreenOrOutputArg(const char *screen_size, const char *output, char *pare } use_geometry = (strchr(screen_size, '+') != NULL); - EPHYR_DBG("screen number:%d\n", screen->mynum); + EPHYR_DBG("screen number:%d\n", screen->pScreen->myNum); hostx_add_screen(screen, p_id, use_geometry, output); } else { diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 643965541..d22fda505 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -174,17 +174,6 @@ hostx_set_display_name(char *name) HostX.server_dpy_name = strdup(name); } -void -hostx_set_screen_number(KdScreenInfo *screen, int number) -{ - EphyrScrPriv *scrpriv = screen->driver; - - if (scrpriv) { - scrpriv->mynum = number; - hostx_set_win_title(screen, ""); - } -} - void hostx_set_win_title(KdScreenInfo *screen, const char *extra_text) { @@ -207,7 +196,7 @@ hostx_set_win_title(KdScreenInfo *screen, const char *extra_text) memset(buf, 0, BUF_LEN + 1); snprintf(buf, BUF_LEN, "Xephyr on %s.%d %s", HostX.server_dpy_name ? HostX.server_dpy_name : ":0", - scrpriv->mynum, (extra_text != NULL) ? extra_text : ""); + screen->mynum, (extra_text != NULL) ? extra_text : ""); xcb_icccm_set_wm_name(HostX.conn, scrpriv->win, @@ -1049,7 +1038,7 @@ hostx_paint_rect(KdScreenInfo *screen, { EphyrScrPriv *scrpriv = screen->driver; - EPHYR_DBG("painting in screen %d\n", scrpriv->mynum); + EPHYR_DBG("painting in screen %d\n", screen->mynum); #ifdef GLAMOR if (ephyr_glamor) { diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 0a2edca21..94a9e9060 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -117,9 +117,6 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, Bool use_geometry, void hostx_set_display_name(char *name); -void -hostx_set_screen_number(KdScreenInfo *screen, int number); - void hostx_set_win_title(KdScreenInfo *screen, const char *extra_text);