Opened 9 years ago

Closed 9 years ago

#49465 closed defect (fixed)

xorg-server @1.17.2_0: XQuartz 2.7.7 on Snow Leopard, Mac OS X 10.6.8, produces defects

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: xorg-server

Description

The screenshot shows some defects when drawing the GNU Emacs windows (frames in Emacs speak) and defects when restoring the original screen background. The right-most Emacs, 25.0.50, was widened to the left and then (kind of) restored to the original width. You can see some black on the left and the bottom in the white line that surround this Emacs. The left-most Emacs, 23.4x, was widened to the right. This led to the white holes in the black lines above and below the widow bar. The lower left shows a similar defect although I did not change the window's height. The middle Emacs "Live-Kastel 2015" shows an "unfinished" black line just below the title bar.

Attachments (3)

XQuartz 2.7.7 (xorg-server 1.17.2).png (736.6 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
The mentioned screenshot
miexpose.c-patch (3.3 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
What is left from the 596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01 patch set
miexpose.2.c-patch (4.7 KB) - added by ballapete (Peter "Pete" Dyballa) 9 years ago.
The version that repaired the defect for xorg-server @1.17.4

Download all attachments as: .zip

Change History (23)

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

The mentioned screenshot

comment:1 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

XQuartz 2.7.7 (xorg-server 1.17.99.901) shows the same behaviour.

comment:2 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

XQuartz 2.7.8 (xorg-server 1.16.4) shows correct behaviour. Therefore it also draws black lines around the X window manager's desktop and GNU Emacs "25.X.50".

comment:3 in reply to:  1 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to Peter_Dyballa@…:

XQuartz 2.7.7 (xorg-server 1.17.99.901) shows the same behaviour.

Ditto XQuartz 2.7.7 (xorg-server 1.17.99.902).

comment:4 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to jeremyhu@…
Port: @1.17.2_0 removed
Summary: XQuartz 2.7.7 (xorg-server 1.17.2) on Snow Leopard, Mac OS X 10.6.8, produces defectsxorg-server @1.17.2_0: XQuartz 2.7.7 on Snow Leopard, Mac OS X 10.6.8, produces defects

When you file a ticket, remember to Cc the port maintainer so that they learn about the problem sooner.

comment:5 in reply to:  4 Changed 9 years ago by graziosi.angelo@…

Hi Ryan, just for completeness...

Replying to ryandesign@…:

When you file a ticket, remember to Cc the port maintainer so that they learn about the problem sooner.

I have just upgraded to xorg-server to 1.17.3. I see that XQuartz 2.7.8 is out (http://xquartz.macosforge.org/landing/), but when I start an X application, the "X11/Informazioni su X11" (i.e. 'About X11' or 'Information on X11'), says

XQuartz 2.7.7 (xorg-server 1.17.3)

I wonder if this should be expected...

Thanks, Angelo.

comment:6 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Angelo, you're running MacPorts' X11.app there, which is 1.17.3. It's newer than the XQuartz 2.7.8 server which contains 1.16.4

comment:7 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I wonder if this is the same as http://xquartz.macosforge.org/trac/ticket/290

I dropped that patch in 1.17 because that code had been refactored and the patch no longer applied.

comment:8 in reply to:  7 ; Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

I wonder if this is the same as http://xquartz.macosforge.org/trac/ticket/290

I dropped that patch in 1.17 because that code had been refactored and the patch no longer applied.

There seem to be similarities, indeed. Which is that dropped patch? I'd like to rebuild xorg-server-devel @1.17.99.902_0 with that patch on PPC Leopard to see whether the behaviour gets cured. And later on Snow Leopard. And how can I build the demo programme from border.c?

comment:9 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

XQuartz 2.7.7 (xorg-server 1.17.4) on PPC Leopard, Mac OS X 10.5.8, also shows this problem with border lines.

comment:10 in reply to:  8 ; Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to Peter_Dyballa@…:

Replying to jeremyhu@…:

I wonder if this is the same as http://xquartz.macosforge.org/trac/ticket/290

I dropped that patch in 1.17 because that code had been refactored and the patch no longer applied.

There seem to be similarities, indeed. Which is that dropped patch?

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01

comment:11 in reply to:  10 ; Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Replying to Peter_Dyballa@…:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01

The code in a recent snapshot has changed a lot. The first four patches cannot be applied because there is no Rootless* and IsFramedWindow* code anymore in mi/miexpose.c. What's left from the set of patches is attached as miexpose.c-patch. I think the compilation will finish when I'll be in deep sleep…

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: miexpose.c-patch added

What is left from the 596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01 patch set

comment:12 in reply to:  11 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Compilation fails early here:

/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include   -I/opt/local/include -I/usr/include -I/opt/mports/trunk/dports/x11/xorg-server-devel/files/dri -I/opt/mports/trunk/dports/x11/xorg-server-devel/files/include -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include  -I../include -I../include -I../Xext  -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/sync -I../miext/shadow  -I../miext/damage -I../render -I../randr -I../fb -I../dbe -I../present -pipe -Os -arch ppc -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -MT libfb_la-fbpict.lo -MD -MP -MF .deps/libfb_la-fbpict.Tpo -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo './'`fbpict.c
libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../include -I/opt/local/include -I/usr/include -I/opt/mports/trunk/dports/x11/xorg-server-devel/files/dri -I/opt/mports/trunk/dports/x11/xorg-server-devel/files/include -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I../include -I../include -I../Xext -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/sync -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb -I../dbe -I../present -pipe -Os -arch ppc -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -MT libfb_la-fbpict.lo -MD -MP -MF .deps/libfb_la-fbpict.Tpo -c fbpict.c  -fno-common -DPIC -o .libs/libfb_la-fbpict.o
fbpict.c: In function ‘fbGlyphs’:
fbpict.c:148: error: too many arguments to function ‘image_from_pict’
fbpict.c:174: error: too many arguments to function ‘image_from_pict’
fbpict.c:177: error: too many arguments to function ‘image_from_pict’
make[1]: *** [libfb_la-fbpict.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_mports_trunk_dports_x11_xorg-server-devel/xorg-server-devel/work/xorg-server-devel-1.17.99.902/fb'

So I would have to try it better with xorg-server…

comment:13 in reply to:  10 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01

Something's not right with that file. Every time I try to apply it I get this report:

[g]patch: **** malformed patch at line 60: @@ -559,6 +574,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)

Could you send me that file by eMail or explain how I could download it? I copied from Safari since I don't know how to fetch the file contents properly.

Applying the patches manually seems to provoke errors…

comment:14 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

You can apply a .diff to the end to get the raw patch:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01.diff

But that won't help much. The contents changed upstream, so the patch no longer applies (as you discovered). You'll need to rewrite the changes and generate a new patch. The exact contents that are there now should serve as a guide but the implementation will be different now.

comment:15 in reply to:  14 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

You can apply a .diff to the end to get the raw patch:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01.diff

For hunk 3 I need some help. The old code could have been:

@@ -574,6 +589,18 @@
     else {
         PixmapPtr pixmap;
 
         tile_x_off = drawable->x;
         tile_y_off = drawable->y;

which is now:

    else {
        PixmapPtr pixmap;

        fill = pWin->border;
        solid = pWin->borderIsPixel;

        /* servers without pixmaps draw their own borders */
        if (!pScreen->GetWindowPixmap)
            return;
        pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
        drawable = &pixmap->drawable;

        while (pWin->backgroundState == ParentRelative)
            pWin = pWin->parent;

        tile_x_off = pWin->drawable.x;
        tile_y_off = pWin->drawable.y;

Can the patch

+#ifdef ROOTLESS
+	if(IsFramedWindow(pWin)) {
+	    RootlessStartDrawing(pWin);
+	    RootlessDamageRegion(pWin, prgn);
+	    
+	    if(!pWin->borderIsPixel &&
+		pWin->backgroundState == ParentRelative) {
+		RootlessSetPixmapOfAncestors(pWin);
+	    }
+	}
+#endif
+

be installed before the newly added code, i.e., after the else clause? Similarly for hunk 4. The old code could have been:

@@ -582,6 +609,12 @@
             return;
         pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
         drawable = &pixmap->drawable;
#ifdef COMPOSITE
         draw_x_off = pixmap->screen_x;
         draw_y_off = pixmap->screen_y;

which is now:

            return;
        pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
        drawable = &pixmap->drawable;

        while (pWin->backgroundState == ParentRelative)
            pWin = pWin->parent;

        tile_x_off = pWin->drawable.x;
        tile_y_off = pWin->drawable.y;

#ifdef COMPOSITE
        draw_x_off = pixmap->screen_x;
        draw_y_off = pixmap->screen_y;

I think the patch

+
+#ifdef XQUARTZ_CLIP_DEBUG
+        ErrorF("     Draw: %d %d %d %d\n",
+               drawable->x, drawable->y, drawable->width, drawable->height);    
+#endif
+	

can safely be installed before the newly added code, i.e., the while loop, it's just for debugging means.

comment:16 in reply to:  14 ; Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

You can apply a .diff to the end to get the raw patch:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01.diff

The modification of this patch repair the defect.

Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: miexpose.2.c-patch added

The version that repaired the defect for xorg-server @1.17.4

comment:17 in reply to:  16 ; Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to Peter_Dyballa@…:

Replying to jeremyhu@…:

You can apply a .diff to the end to get the raw patch:

https://github.com/XQuartz/xorg-server/commit/596efccbd9fa0a4b6c5ea64fc1f2e11a42c17e01.diff

The modification of this patch repair the defect.

On Snow Leopard, Mac OS X 10.6.8, I can still see the defect… I'll try the build once more.

comment:18 in reply to:  17 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

Replying to Peter_Dyballa@…:

On Snow Leopard, Mac OS X 10.6.8, I can still see the defect… I'll try the build once more.

The cause is: port fetched for installation an archive from the internet!

I tested with port build xorg-server and invoked then port install xorg-server. Last night I performed a port archive xorg-server before installation, and this installed XQuartz 2.7.7 (xorg-server 1.17.4) without defects from my own archive.

comment:19 Changed 9 years ago by ballapete (Peter "Pete" Dyballa)

What's puzzling me is why xorg-server @1.17.4 does not show this defect on PPC Tiger, Mac OS X 10.4.11. Just recently I built it and it works alright without patch.

comment:20 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

Addressed in r143917.

Note: See TracTickets for help on using tickets.