xserver: Branch 'master' - 6 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jul 21 13:56:17 UTC 2019


 .appveyor.yml                   |    3 +-
 hw/xwin/glx/indirect.c          |   27 ++++++++++++++++-----
 hw/xwin/winmultiwindowwm.c      |   51 ++++++++++++++++++++++++++++++++--------
 hw/xwin/winmultiwindowwndproc.c |    4 +--
 hw/xwin/winwindow.h             |    4 +--
 hw/xwin/winwndproc.c            |    2 -
 6 files changed, 69 insertions(+), 22 deletions(-)

New commits:
commit a9537cfdd1ed9656f4e29225af8861418b4fd682
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Sun Jul 21 14:43:24 2019 +0100

    appveyor: Drop building Xorg server
    
    (Temporarily) drop building Xorg server (since this doesn't work after
    a530b6e8) until we come up with a better solution. (See #692)

diff --git a/.appveyor.yml b/.appveyor.yml
index b86e33ed4..083ac1a2b 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -75,7 +75,7 @@ cache:
 - '%CYGWIN_ROOT%\home\%USERNAME%\.ccache'
 build_script:
 - SET PATH=%CYGWIN_ROOT%/bin
-- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; meson setup --prefix=/usr -Dxv=false -Dxf86bigfont=true -Ddmx=true -Dxephyr=true -Dxnest=true -Dxvfb=true -Dxwin=true -Dxorg=true -Dhal=false -Dudev=false -Dpciaccess=false -Dint10=false build"'
+- '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; meson setup --prefix=/usr -Dxv=false -Dxf86bigfont=true -Ddmx=true -Dxephyr=true -Dxnest=true -Dxvfb=true -Dxwin=true -Dxorg=false -Dhal=false -Dudev=false -Dpciaccess=false -Dint10=false build"'
 - '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; meson configure build"'
 - '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ninja -C build"'
 - '%CYGWIN_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; ccache -s"'
commit 401ff618cf5bb93648c05f025dfa96b0324e94b7
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Sat Jul 6 17:58:12 2019 +0100

    appveyor: Workaround a Cygwin setup bug
    
    Run Cygwin's setup a second time to workaround for it's defective
    handling of obsolete packages.
    
    (Specifically, python3-lxml is currently obsoleted by python36-lxml, but
    that doesn't get installed on the first run)

diff --git a/.appveyor.yml b/.appveyor.yml
index 50072acd4..b86e33ed4 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -69,6 +69,7 @@ xkbcomp-devel,\
 xkeyboard-config,\
 xtrans"
 - echo Install done
+- "%CYGWIN_ROOT%\\%SETUP% -qnNdO -R %CYGWIN_ROOT% -s %CYGWIN_MIRROR% -l %CACHE% -g"
 cache:
 - C:\cache
 - '%CYGWIN_ROOT%\home\%USERNAME%\.ccache'
commit 011b87a8c6e68b992ed27db4e93ae1f1e6dc508f
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Wed Oct 29 14:05:52 2014 +0000

    hw/xwin: Add EWMH properties for describing multiple desktops to the root window
    
    mate-terminal apparently requires these to be present to work
    
    We just set them to describe one desktop, for the moment.
    
    It seems we can safely ignore the _NET_WM_DESKTOP property on child
    windows, and any _NET_WM_DESKTOP messages, as we only support one
    desktop for windows to be on.
    
    Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 69917fddd..aa83c2c41 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -116,6 +116,9 @@ typedef struct _WMInfo {
     xcb_atom_t atmPrivMap;
     xcb_atom_t atmUtf8String;
     xcb_atom_t atmNetWmName;
+    xcb_atom_t atmCurrentDesktop;
+    xcb_atom_t atmNumberDesktops;
+    xcb_atom_t atmDesktopNames;
     xcb_ewmh_connection_t ewmh;
     Bool fCompositeWM;
 } WMInfoRec, *WMInfoPtr;
@@ -1461,6 +1464,8 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
     char pszDisplay[512];
     int iReturn;
     xcb_auth_info_t *auth_info;
+    xcb_screen_t *root_screen;
+    xcb_window_t root_window_id;
 
     winDebug("winInitMultiWindowWM - Hello\n");
 
@@ -1530,6 +1535,9 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
     pWMInfo->atmPrivMap = intern_atom(pWMInfo->conn, WINDOWSWM_NATIVE_HWND);
     pWMInfo->atmUtf8String = intern_atom(pWMInfo->conn, "UTF8_STRING");
     pWMInfo->atmNetWmName = intern_atom(pWMInfo->conn, "_NET_WM_NAME");
+    pWMInfo->atmCurrentDesktop = intern_atom(pWMInfo->conn, "_NET_CURRENT_DESKTOP");
+    pWMInfo->atmNumberDesktops = intern_atom(pWMInfo->conn, "_NET_NUMBER_OF_DESKTOPS");
+    pWMInfo->atmDesktopNames = intern_atom(pWMInfo->conn, "__NET_DESKTOP_NAMES");
 
     /* Initialization for the xcb_ewmh and EWMH atoms */
     {
@@ -1564,6 +1572,32 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
         }
     }
 
+    /* Get root window id */
+    root_screen = xcb_aux_get_screen(pWMInfo->conn, pProcArg->dwScreen);
+    root_window_id = root_screen->root;
+
+    /*
+      Set root window properties for describing multiple desktops to describe
+      the one desktop we have
+    */
+    {
+        int data;
+        const char buf[] = "Desktop";
+
+        data = 0;
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmCurrentDesktop, XCB_ATOM_CARDINAL, 32,
+                            1, &data);
+        data = 1;
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmNumberDesktops, XCB_ATOM_CARDINAL, 32,
+                            1, &data);
+
+        xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id,
+                            pWMInfo->atmDesktopNames, pWMInfo->atmUtf8String, 8,
+                            strlen(buf), (unsigned char *) buf);
+    }
+
     /*
       Set the root window cursor to left_ptr (this controls the cursor an
       application gets over it's windows when it doesn't set one)
@@ -1577,9 +1611,6 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
         uint32_t mask = XCB_CW_CURSOR;
         uint32_t value_list = cursor;
 
-        xcb_screen_t *root_screen = xcb_aux_get_screen(pWMInfo->conn, pProcArg->dwScreen);
-        xcb_window_t window = root_screen->root;
-
         static const uint16_t fgred = 0, fggreen = 0, fgblue = 0;
         static const uint16_t bgred = 0xFFFF, bggreen = 0xFFFF, bgblue = 0xFFFF;
 
@@ -1589,7 +1620,7 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
                                 shape, shape + 1,
                                 fgred, fggreen, fgblue, bgred, bggreen, bgblue);
 
-        xcb_change_window_attributes(pWMInfo->conn, window, mask, &value_list);
+        xcb_change_window_attributes(pWMInfo->conn, root_window_id, mask, &value_list);
 
         xcb_free_cursor(pWMInfo->conn, cursor);
         xcb_close_font(pWMInfo->conn, font);
commit 3d493e91ab66c8f66efaded6b81c87385863b843
Author: Colin Harrison <colin at xming.myzen.co.uk>
Date:   Tue Aug 28 15:30:23 2018 +0100

    hw/xwin: Respect -notrayicon option on taskbar restart

diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index e375be9c1..224bfba79 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -1173,7 +1173,7 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         break;
 
     default:
-        if (message == s_uTaskbarRestart) {
+        if ((message == s_uTaskbarRestart) && !s_pScreenInfo->fNoTrayIcon)  {
             winInitNotifyIcon(s_pScreenPriv);
         }
         break;
commit a588e6f81b1d8dfb9076358e5039d3ee6628a50f
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Thu Jul 2 22:21:28 2015 +0100

    hw/xwin: Rename WM_WM_MAP{2,3} to WM_WM_MAP_{UN,}MANAGED
    
    WM_WM_MAP was removed in 52e05b92
    
    Rename WM_WM_MAP2 as WM_WM_MAP_UNMANAGED (meaning an override-redirect
    window, which manages it's own activation)
    
    Rename WM_WM_MAP3 as WM_WM_MAP_MANAGED (meaning a normal window, which
    is activated when clicked)

diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 0734006fc..69917fddd 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -222,11 +222,11 @@ MessageName(winWMMessagePtr msg)
     case WM_WM_CHANGE_STATE:
       return "WM_WM_CHANGE_STATE";
       break;
-    case WM_WM_MAP2:
-      return "WM_WM_MAP2";
+    case WM_WM_MAP_UNMANAGED:
+      return "WM_WM_MAP_UNMANAGED";
       break;
-    case WM_WM_MAP3:
-      return "WM_WM_MAP3";
+    case WM_WM_MAP_MANAGED:
+      return "WM_WM_MAP_MANAGED";
       break;
     case WM_WM_HINTS_EVENT:
       return "WM_WM_HINTS_EVENT";
@@ -842,7 +842,7 @@ winMultiWindowWMProc(void *pArg)
             }
             break;
 
-        case WM_WM_MAP2:
+        case WM_WM_MAP_UNMANAGED:
             /* Put a note as to the HWND associated with this Window */
             xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE,
                                 pNode->msg.iWindow, pWMInfo->atmPrivMap,
@@ -851,7 +851,7 @@ winMultiWindowWMProc(void *pArg)
 
             break;
 
-        case WM_WM_MAP3:
+        case WM_WM_MAP_MANAGED:
             /* Put a note as to the HWND associated with this Window */
             xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE,
                                 pNode->msg.iWindow, pWMInfo->atmPrivMap,
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 587884d11..31b5d6307 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -1005,7 +1005,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     }
                 }
             }
-            wmMsg.msg = WM_WM_MAP3;
+            wmMsg.msg = WM_WM_MAP_MANAGED;
         }
         else {                  /* It is an overridden window so make it top of Z stack */
 
@@ -1025,7 +1025,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                      SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
                 }
             }
-            wmMsg.msg = WM_WM_MAP2;
+            wmMsg.msg = WM_WM_MAP_UNMANAGED;
         }
 
         /* Tell our Window Manager thread to map the window */
diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h
index 402b9e63c..92a839c4d 100644
--- a/hw/xwin/winwindow.h
+++ b/hw/xwin/winwindow.h
@@ -107,8 +107,8 @@ typedef struct _winWMMessageRec {
 #define		WM_WM_NAME_EVENT	(WM_USER + 9)
 #define		WM_WM_ICON_EVENT	(WM_USER + 10)
 #define		WM_WM_CHANGE_STATE	(WM_USER + 11)
-#define		WM_WM_MAP2		(WM_USER + 12)
-#define		WM_WM_MAP3		(WM_USER + 13)
+#define		WM_WM_MAP_UNMANAGED	(WM_USER + 12)
+#define		WM_WM_MAP_MANAGED	(WM_USER + 13)
 #define		WM_WM_HINTS_EVENT	(WM_USER + 14)
 
 #define		MwmHintsDecorations	(1L << 1)
commit a47e7eb247d5c61be43d31b32887dee1dc89ba67
Author: Jon Turney <jon.turney at dronecode.org.uk>
Date:   Fri May 9 22:09:38 2014 +0100

    hw/xwin: Log counts of pixel formats which couldn't be used
    
    Log a count of pixel formats which couldn't be used for various reasons

diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index c336663b0..38605914a 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -100,6 +100,12 @@
 #endif
 
 
+typedef struct  {
+    int notOpenGL;
+    int unknownPixelType;
+    int unaccelerated;
+} PixelFormatRejectStats;
+
 /* ---------------------------------------------------------------------- */
 /*
  * Various debug helpers
@@ -285,13 +291,15 @@ swap_method_name(int mthd)
 }
 
 static void
-fbConfigsDump(unsigned int n, __GLXconfig * c)
+fbConfigsDump(unsigned int n, __GLXconfig * c, PixelFormatRejectStats *rejects)
 {
     LogMessage(X_INFO, "%d fbConfigs\n", n);
+    LogMessage(X_INFO, "ignored pixel formats: %d not OpenGL, %d unknown pixel type, %d unaccelerated\n",
+               rejects->notOpenGL, rejects->unknownPixelType, rejects->unaccelerated);
 
     if (g_iLogVerbose < 3)
         return;
-    ErrorF("%d fbConfigs\n", n);
+
     ErrorF
         ("pxf vis  fb                      render         Ste                     aux    accum        MS    drawable             Group/ sRGB\n");
     ErrorF
@@ -376,7 +384,8 @@ static HDC glxWinMakeDC(__GLXWinContext * gc, __GLXWinDrawable * draw,
 static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable * draw);
 
 static void glxWinCreateConfigs(HDC dc, glxWinScreen * screen);
-static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen);
+static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen,
+                                   PixelFormatRejectStats * rejects);
 static int fbConfigToPixelFormat(__GLXconfig * mode,
                                  PIXELFORMATDESCRIPTOR * pfdret,
                                  int drawableTypeOverride);
@@ -482,6 +491,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
     HWND hwnd;
     HDC hdc;
     HGLRC hglrc;
+    PixelFormatRejectStats rejects;
 
     GLWIN_DEBUG_MSG("glxWinScreenProbe");
 
@@ -649,8 +659,9 @@ glxWinScreenProbe(ScreenPtr pScreen)
         screen->base.pScreen = pScreen;
 
         // Creating the fbConfigs initializes screen->base.fbconfigs and screen->base.numFBConfigs
+        memset(&rejects, 0, sizeof(rejects));
         if (strstr(wgl_extensions, "WGL_ARB_pixel_format")) {
-            glxWinCreateConfigsExt(hdc, screen);
+            glxWinCreateConfigsExt(hdc, screen, &rejects);
 
             /*
                Some graphics drivers appear to advertise WGL_ARB_pixel_format,
@@ -663,6 +674,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
         }
 
         if (screen->base.numFBConfigs <= 0) {
+            memset(&rejects, 0, sizeof(rejects));
             glxWinCreateConfigs(hdc, screen);
             screen->has_WGL_ARB_pixel_format = FALSE;
         }
@@ -690,7 +702,7 @@ glxWinScreenProbe(ScreenPtr pScreen)
     DestroyWindow(hwnd);
 
     // dump out fbConfigs now fbConfigIds and visualIDs have been assigned
-    fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs);
+    fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects);
 
     /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */
     screen->RealizeWindow = pScreen->RealizeWindow;
@@ -2046,7 +2058,7 @@ getAttrValue(const int attrs[], int values[], unsigned int num, int attr,
 // Create the GLXconfigs using wglGetPixelFormatAttribfvARB() extension
 //
 static void
-glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
+glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * rejects)
 {
     GLXWinConfig *first = NULL, *prev = NULL;
     int i = 0;
@@ -2157,6 +2169,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
 #define ATTR_VALUE(a, d) getAttrValue(attrs, values, num_attrs, (a), (d))
 
         if (!ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, 0)) {
+            rejects->notOpenGL++;
             GLWIN_DEBUG_MSG
                 ("pixelFormat %d isn't WGL_SUPPORT_OPENGL_ARB, skipping",
                  i + 1);
@@ -2229,6 +2242,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
             break;
 
         default:
+            rejects->unknownPixelType++;
             ErrorF
                 ("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_PIXEL_TYPE_ARB\n",
                  ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0));
@@ -2269,6 +2283,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen)
                  ATTR_VALUE(WGL_ACCELERATION_ARB, 0));
 
         case WGL_NO_ACCELERATION_ARB:
+            rejects->unaccelerated++;
             c->base.visualRating = GLX_SLOW_VISUAL_EXT;
             GLWIN_DEBUG_MSG("pixelFormat %d is un-accelerated, skipping", i + 1);
             continue;


More information about the xorg-commit mailing list