mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 07:50:05 +01:00
Select for SubstructureRedirectMask on screen window and make sure
no WM is running when using back-end server root window.
This commit is contained in:
parent
d23a64fb67
commit
95106e7245
4 changed files with 26 additions and 2 deletions
|
|
@ -1793,6 +1793,17 @@ dmxAttachScreen (int idx,
|
|||
dmxCheckForWM(dmxScreen);
|
||||
dmxGetScreenAttribs(dmxScreen);
|
||||
|
||||
if (dmxScreen->beUseRoot && dmxScreen->WMRunningOnBE)
|
||||
{
|
||||
dmxLogErrorSet (dmxWarning, errorSet, error, errorName,
|
||||
"WM running. cannot use back-end server "
|
||||
"root window\n");
|
||||
|
||||
/* Restore the old screen */
|
||||
*dmxScreen = oldDMXScreen;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef RANDR
|
||||
dmxScreen->beRandr = FALSE;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -611,6 +611,19 @@ static Bool dmxDisplayInit(DMXScreenInfo *dmxScreen)
|
|||
dmxCheckForWM(dmxScreen);
|
||||
dmxGetScreenAttribs(dmxScreen);
|
||||
|
||||
if (dmxScreen->beUseRoot && dmxScreen->WMRunningOnBE)
|
||||
{
|
||||
dmxLog (dmxWarning,
|
||||
"WM running. cannot use back-end server root window\n");
|
||||
|
||||
XLIB_PROLOGUE (dmxScreen);
|
||||
XCloseDisplay(dmxScreen->beDisplay);
|
||||
XLIB_EPILOGUE (dmxScreen);
|
||||
dmxScreen->beDisplay = NULL;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dmxGetVisualInfo(dmxScreen))
|
||||
{
|
||||
dmxLog(dmxWarning,
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ void dmxBEScreenInit(int idx, ScreenPtr pScreen)
|
|||
/* Create root window for screen */
|
||||
mask = CWBackPixel | CWEventMask | CWColormap | CWOverrideRedirect;
|
||||
attribs.background_pixel = dmxScreen->beBlackPixel;
|
||||
attribs.event_mask = StructureNotifyMask;
|
||||
attribs.event_mask = StructureNotifyMask | SubstructureRedirectMask;
|
||||
attribs.colormap = dmxScreen->beDefColormaps[dmxScreen->beDefVisualIndex];
|
||||
attribs.override_redirect = True;
|
||||
|
||||
|
|
|
|||
|
|
@ -621,7 +621,7 @@ void dmxBackendInit(DevicePtr pDev)
|
|||
|
||||
/* Finish initialization using computed values or constants. */
|
||||
dmxBackendComputeCenter(priv);
|
||||
priv->eventMask = StructureNotifyMask;
|
||||
priv->eventMask = StructureNotifyMask | SubstructureRedirectMask;
|
||||
priv->myScreen = dmxScreen->index;
|
||||
priv->lastX = priv->centerX;
|
||||
priv->lastY = priv->centerY;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue