~pierrec

Recent activity

Re: [PATCH gio] app: support changing Window options at runtime 15 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Le mer. 7 avr. 2021 à 09:58, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Wed Apr 7, 2021 at 09:44 CEST, Pierre Curto wrote:
> > Great!
> >
> > Now, how do you see manipulating the window options from ops?
> > A WindowOptionOp in the op package for instance?
> >
>
> Can you think of a use-case for WindowOptionOp where app.Window.Option
> is not appropriate?
>
> Triggering an option change (say, fullscreen mode) may happen as a
> result of interacting with a widget (say, a checkbox) but setting the

Re: [PATCH gio] app: support changing Window options at runtime 15 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Great!

Now, how do you see manipulating the window options from ops?
A WindowOptionOp in the op package for instance?

Le mer. 7 avr. 2021 à 09:25, Elias Naur <mail@eliasnaur.com> a écrit :
>
> Thanks, merged.
>
> Elias

Re: [PATCH gio] app: support changing Window options at runtime 15 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Le mer. 7 avr. 2021 à 08:16, Elias Naur <mail@eliasnaur.com> a écrit :
>
> Almost there.
>
> On Tue Apr 6, 2021 at 18:46 CEST, ~pierrec wrote:
> > diff --git a/app/internal/wm/os_x11.go b/app/internal/wm/os_x11.go
> > index b921d468..3c18241a 100644
> > --- a/app/internal/wm/os_x11.go
> > +++ b/app/internal/wm/os_x11.go
> > @@ -124,6 +126,20 @@ func (w *x11Window) WriteClipboard(s string) {
> >  }
> >
> >  func (w *x11Window) Option(opts *Options) {
> > +     w.mu.Lock()

Re: [PATCH gio] app/internal/wm: use Option method to initialize windows 20 days ago

From Pierre Curto to ~eliasnaur/gio-patches

I see.
Should this be a separate patch or not?

Le ven. 2 avr. 2021 à 17:22, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Fri Apr 2, 2021 at 17:01 CEST, Pierre Curto wrote:
> > But, isn't gio_dispatchMainFuncs (via gio_wakeupMainThread in
> > os_darwin.m) always called while on the main thread?
> >
> > If I had that check in gio_dispatchMainFuncs (os_darwin.go), then f
> > needs to be requeued but it will lose its position. Is that OK?
> >
>
> I had in mind (incomplete):

Re: [PATCH gio] app/internal/wm: use Option method to initialize windows 20 days ago

From Pierre Curto to ~eliasnaur/gio-patches

But, isn't gio_dispatchMainFuncs (via gio_wakeupMainThread in
os_darwin.m) always called while on the main thread?

If I had that check in gio_dispatchMainFuncs (os_darwin.go), then f
needs to be requeued but it will lose its position. Is that OK?

Le ven. 2 avr. 2021 à 16:31, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Fri Apr 2, 2021 at 16:24, Pierre Curto wrote:
> > Le ven. 2 avr. 2021 à 15:57, Elias Naur <mail@eliasnaur.com> a écrit :
> > >
> > > On Fri Apr 2, 2021 at 14:45 CEST, ~pierrec wrote:
> > > > From: pierre <pierre.curto@gmail.com>
> > > >

Re: [PATCH gio] app/internal/wm: use Option method to initialize windows 20 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Le ven. 2 avr. 2021 à 15:57, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Fri Apr 2, 2021 at 14:45 CEST, ~pierrec wrote:
> > From: pierre <pierre.curto@gmail.com>
> >
> > Added (*w.window).Option methods to the backends and use them for setting the initial options passed into NewWindow.
> >
> > Signed-off-by: pierre <pierre.curto@gmail.com>
> > ---
> > diff --git a/app/internal/wm/os_macos.go b/app/internal/wm/os_macos.go
> > index b82c8d0f..d088a924 100644
> > --- a/app/internal/wm/os_macos.go
> > +++ b/app/internal/wm/os_macos.go
> > @@ -46,6 +46,10 @@ __attribute__ ((visibility ("hidden"))) CFTypeRef gio_createWindow(CFTypeRef vie

Re: [PATCH gio] app/internal/wm: fixed Windows window sizes 21 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Let' backtrack a little.
I made a change in os_macos.go that is confusing me.

The screen scaling in os_macos.go/NewWindow will always do nothing:
```
screenScale := float32(C.gio_getScreenBackingScale())
cfg := configFor(screenScale)
...
width = int(float32(cfg.Px(o.Width)) / screenScale)
```

as it is equivalent to:
```
width = int(o.Width.V)

Re: [PATCH gio 1/2] app/internal/wm: change Options fields from values to pointers 22 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Le mer. 31 mars 2021 à 18:02, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Wed Mar 31, 2021 at 17:03, Pierre Curto wrote:
> > Le mer. 31 mars 2021 à 15:06, Elias Naur <mail@eliasnaur.com> a écrit :
> > >
> > > On Wed Mar 31, 2021 at 10:24, ~pierrec wrote:
> > > > From: pierre <pierre.curto@gmail.com>
> > > >
> > > > Switching to pointer values in Options, including using window manager defaults for size and title, in preparation for updating options on the fly.
> > > >
> > > > Signed-off-by: pierre <pierre.curto@gmail.com>
> > > > ---
> > > > -
> > > >

Re: [PATCH gio 1/2] app/internal/wm: change Options fields from values to pointers 22 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Le mer. 31 mars 2021 à 15:06, Elias Naur <mail@eliasnaur.com> a écrit :
>
> On Wed Mar 31, 2021 at 10:24, ~pierrec wrote:
> > From: pierre <pierre.curto@gmail.com>
> >
> > Switching to pointer values in Options, including using window manager defaults for size and title, in preparation for updating options on the fly.
> >
> > Signed-off-by: pierre <pierre.curto@gmail.com>
> > ---
> > -
> >
> > diff --git a/app/internal/wm/os_macos.go b/app/internal/wm/os_macos.go
> > index 68ead7b..feb7ec9 100644
> > --- a/app/internal/wm/os_macos.go

Re: [PATCH gio] io/pointer: support nested scrollables 22 days ago

From Pierre Curto to ~eliasnaur/gio-patches

Thanks a lot for your patience Elias :)!

Le mer. 31 mars 2021 à 09:59, Elias Naur <mail@eliasnaur.com> a écrit :
>
> Merged, with the nits below applied. Thank you very much for fixing this
> important issue!
>
> Elias
>
> On Wed Mar 31, 2021 at 08:25 CEST, ~pierrec wrote:
> > From: pierre <pierre.curto@gmail.com>
> >
> > Fixes #185.
> >