~eliasnaur/gio

Mailing list for the Gio project for discussion and patches.

Send your message to ~eliasnaur/gio@lists.sr.ht. No account is required and you can post without being subscribed.

Re: [PATCH 6/6] ui/app: add "no X11" build tag

Details
Message ID
<BWXUCVA0RJXC.2T6MO840DMZIF@testmac>
DKIM signature
pass
Download raw message
On Wed Sep 11, 2019 at 9:13 PM Denys Smirnov wrote:
> On Sun, 8 Sep 2019 at 12:14, Elias Naur <mail@eliasnaur.com> wrote:
> >
> > Thankyou. I'm using the result of a squash of all 6 patches for this
> > review.
> >
> >         diff --git a/ui/app/egl.go b/ui/app/egl.go
> >         index ee07993..6c448d9 100644
> >         --- a/ui/app/egl.go
> >         +++ b/ui/app/egl.go
> >         @@ -9,6 +9,7 @@ import (
> >                 "fmt"
> >                 "runtime"
> >                 "strings"
> >         +       "unsafe"
> >
> >                 "gioui.org/ui/app/internal/gl"
> >          )
> >         @@ -148,14 +149,14 @@ func (c *context) MakeCurrent() error {
> >                 }
> >                 if c.eglWin == nil {
> >                         var err error
> >         -               c.eglWin, err = newEGLWindow(win, width, height)
> >         +               c.eglWin, err = c.driver.newEGLWindow(unsafe.Pointer(win), width, height)
> >
> > Why is the cast here and below needed? From a glance in my copy of
> > eglplatform.h, perhaps we need to drop WL_EGL_PLATFORM and use the
> > MESA_EGL_NO_X11_HEADERS define.
> 
> I changed the signature of this method to accept an unsafe.Pointer.
> This cast won't be there n the next patch.
> 

I believe you can keep the signature type-specific if the MESA_EGL_NO_X11_HEADERS trick works.

> 
> So how do send the next patch? Should I squash everything into a
> single commit and mail it again?
> 

You should mail the patch series again. You only need to squash commits
that makes sense to combine into a single commit. I imagine the changes
that prepares the existing code for the X11 backend is one commit, while
the actual X11 port (along with the nox11 tag) is a second.

-- elias