~eliasnaur

~eliasnaur/gio-patches

Last active an hour ago

~eliasnaur/gio

Last active an hour ago
View more

Recent activity

Re: Detecting mouse wheel an hour ago

From Elias Naur to ~eliasnaur/gio

On Tue Jan 25, 2022 at 15:06, R D wrote:
> I can scroll in kitchen example without any problem.
>

But your example doesn't report scrolling? Please post a minimal, yet complete
program that clearly demonstrates the problem.

Thanks,
Elias

> On Tue, Jan 25, 2022 at 2:55 PM Elias Naur <mail@eliasnaur.com> wrote:
> >
> > On Tue Jan 25, 2022 at 14:32, R D wrote:
> > > IMK log.Print only shows pointer position and time. I am expecting a

Re: Detecting mouse wheel 3 hours ago

From Elias Naur to ~eliasnaur/gio

On Tue Jan 25, 2022 at 14:32, R D wrote:
> IMK log.Print only shows pointer position and time. I am expecting a
> positive or negative roll direction here. In case it's not here, what
> event is the correct one? I looked at the material list. But I
> couldn't figure out how gio scroll using the mouse.
> {Scroll Mouse 0 Foremost 51h26m22.093s  (44,65) (0,0) }
>

I would expect pointer.Event.Scroll to contain scroll distances as well. Can
you scroll any of the Gio examples, such as the kitchen program? If not, there
may be a bug in Gio.

Elias

Re: Detecting mouse wheel 8 hours ago

From Elias Naur to ~eliasnaur/gio

On Sun Jan 23, 2022 at 01:25, R D wrote:
> How can I detect if the mouse wheel is rolling upward or downward in
> this function?
> `
> func doButton(ops *op.Ops, q event.Queue) {
>     // Process events that arrived between the last frame and this one.
>
>     for _, ev := range q.Events(tag) {
>         if x, ok := ev.(pointer.Event); ok {
>             switch x.Type {
>             case pointer.Press:
>                 pressed = true
>             case pointer.Release:
>                 pressed = false

Re: [PATCH gio] layout: reorder fields in Inset to match system.Insets 8 hours ago

From Elias Naur to ~eliasnaur/gio-patches

Thanks, merged. Still think system.Inset should go, but perhaps that
introduces an import cycle?

Elias

Re: Should gesture.Hover consider pointer.Cancel events similar to that of pointer.Leave ? a day ago

From Elias Naur to ~eliasnaur/gio

On Mon Jan 24, 2022 at 10:12, Rajiv Kanchan wrote:
> While dragging a widget using gesture.Drag, which is also listening to
> gesture.Hover events, the Hover handler loses out to the Drag handler
> and receives a pointer.Cancel, but "func (h *Hover) Hovered(q
> event.Queue) bool" continues to return true.
>
> Unless I am using this incorrectly, in which case please educate me, I
> believe that the pointer.Cancel event should be considered to have a
> similar effect as that of pointer.Leave making  "func (h *Hover)
> Hovered(q event.Queue) bool" return false.
>

You're absolutely correct. All gesture handlers, gesture.Hover included,
should handle pointer.Cancel. Please file an issue, or send us a patch

Re: [PATCH gio] app: use material.Decorations on undecorated platforms 2 days ago

From Elias Naur to ~eliasnaur/gio-patches

As I said before, this is great work, and the decorations look really good.

There are a few issues below, and here's a list of issues to be addressed
in follow-ups to make Wayland the default driver:

- Don't ask for server-side decorations. Listen for decoration mode callbacks
from Wayland server and set Decorated accordingly.
- Account for fallback decorations in window sizes.
- Swap order of Wayland and X11 drivers.

On Sat Jan 22, 2022 at 09:32, ~pierrec wrote:
> From: Pierre Curto <pierre.curto@gmail.com>
>
> This patch implements a mechanism for customizing window

Re: [PATCH gio] [Wayland] update the WindowMode when un-minimized 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

Thanks. Merged with a subjet tweak.

Elias

Re: [PATCH gio] widget/material: add the Decorations widget app: use material.Decorations as default 4 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Fri Jan 21, 2022 at 08:07 CET, ~pierrec wrote:
> From: Pierre Curto <pierre.curto@gmail.com>
>
> This patch implements a mechanism for customizing window
> decorations.
> If a window is configured with app.Decorated(true), then the
> decorations provided by the app.Decorate(app.Decorations) option
> are applied. Custom decorations can be provided but by default
> it uses the material.Decorations ones.
>
> Decorations are automatically applied on Wayland if the Wayland
> server does not provide window decorations.
>