Re: [Spice-devel] [PATCH spice-gtk 0/2] clipboard: skip release between grabs

2019-03-24 Thread Marc-André Lureau
Hi

On Sun, Mar 24, 2019 at 6:50 PM Jakub Janku  wrote:
>
> Hi,
>
> On Fri, Mar 22, 2019 at 10:15 AM Victor Toso  wrote:
> >
> > Hi James,
> >
> > If you have the time, could you give this a try?
>
> CC-ing James
> >
> > Cheers,
> >
> > On Thu, Mar 21, 2019 at 01:21:32PM +0100, marcandre.lur...@redhat.com wrote:
> > > From: Marc-André Lureau 
> > >
> > > Hi,
> > >
> > > There has been several reports of clipboard issues that seem related
> > > to clipboard managers interactions. Although it's not crystal clear
> > > what are the problems,
>
> Hmmm. What's left to be cleared?

Don't ask me to clarify bugs I don't fully understand and can't
reproduce reliably...

All I understand is that some clipboard managers react in various ways
to release events, and the spice protocol isn't able to cope nicely
with grab races, which creates conflicting situations.

>
> >> we realized the spice protocol does't handle
> > > well conflicting grabs coming simultaneously from client and remote.
> > > Each other believe the other side is the owner. This situation
> > > is rare, but with a clipboard manager that reacts to release events,
> > > it may be more easily reproducible.
> > >
> > > Both agent & client send release between grabs today. This series
> > > propose to stop releasing between grabs on client side, and adds a
> > > 0.5s delay for the release event coming from the agent side, to filter
> > > out release between grabs.
>
> Delaying the release for 0.5 seconds seems wrong to me. Given it's
> just a temporary workaround, I'm fine with it.

Keeping in mind that release event is not usually vital for a
functioning clipboard sharing.

There are not that many release events. We have those created by spice
implementations that are easily removable as done in my series.

And then those created by the users which are impacted by the usual
communication (be it IPC or over the network). Adding 0.5s isn't going
to change much the user experience for something that is already
margninal to a functioning clipboard.

> But it should be tested by someone who's experienced the issues in the
> real world to see if the delay is sufficient and doesn't cause any
> other problems.
> > >
> > > Further protocol improvements should remove the need for a delay, and
> > > solve the conflicting situation in all cases. This will come in a
> > > future series.
> > >
> > > Marc-André Lureau (2):
> > >   clipboard: do not release between client grabs
> > >   clipboard: do not release between remote grabs
> > >
> > >  src/spice-gtk-session.c | 101 +++-
> > >  1 file changed, 80 insertions(+), 21 deletions(-)
> > >
> > > --
> > > 2.21.0.4.g36eb1cb9cf
> > >
> > > ___
> > > Spice-devel mailing list
> > > Spice-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
> Cheers,
> Jakub
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 0/2] clipboard: skip release between grabs

2019-03-24 Thread Jakub Janku
Hi,

On Fri, Mar 22, 2019 at 10:15 AM Victor Toso  wrote:
>
> Hi James,
>
> If you have the time, could you give this a try?

CC-ing James
>
> Cheers,
>
> On Thu, Mar 21, 2019 at 01:21:32PM +0100, marcandre.lur...@redhat.com wrote:
> > From: Marc-André Lureau 
> >
> > Hi,
> >
> > There has been several reports of clipboard issues that seem related
> > to clipboard managers interactions. Although it's not crystal clear
> > what are the problems,

Hmmm. What's left to be cleared?

>> we realized the spice protocol does't handle
> > well conflicting grabs coming simultaneously from client and remote.
> > Each other believe the other side is the owner. This situation
> > is rare, but with a clipboard manager that reacts to release events,
> > it may be more easily reproducible.
> >
> > Both agent & client send release between grabs today. This series
> > propose to stop releasing between grabs on client side, and adds a
> > 0.5s delay for the release event coming from the agent side, to filter
> > out release between grabs.

Delaying the release for 0.5 seconds seems wrong to me. Given it's
just a temporary workaround, I'm fine with it.
But it should be tested by someone who's experienced the issues in the
real world to see if the delay is sufficient and doesn't cause any
other problems.
> >
> > Further protocol improvements should remove the need for a delay, and
> > solve the conflicting situation in all cases. This will come in a
> > future series.
> >
> > Marc-André Lureau (2):
> >   clipboard: do not release between client grabs
> >   clipboard: do not release between remote grabs
> >
> >  src/spice-gtk-session.c | 101 +++-
> >  1 file changed, 80 insertions(+), 21 deletions(-)
> >
> > --
> > 2.21.0.4.g36eb1cb9cf
> >
> > ___
> > Spice-devel mailing list
> > Spice-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel

Cheers,
Jakub
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 0/2] clipboard: skip release between grabs

2019-03-22 Thread Victor Toso
Hi James,

If you have the time, could you give this a try?

Cheers,

On Thu, Mar 21, 2019 at 01:21:32PM +0100, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau 
> 
> Hi,
> 
> There has been several reports of clipboard issues that seem related
> to clipboard managers interactions. Although it's not crystal clear
> what are the problems, we realized the spice protocol does't handle
> well conflicting grabs coming simultaneously from client and remote.
> Each other believe the other side is the owner. This situation
> is rare, but with a clipboard manager that reacts to release events,
> it may be more easily reproducible.
> 
> Both agent & client send release between grabs today. This series
> propose to stop releasing between grabs on client side, and adds a
> 0.5s delay for the release event coming from the agent side, to filter
> out release between grabs.
> 
> Further protocol improvements should remove the need for a delay, and
> solve the conflicting situation in all cases. This will come in a
> future series.
> 
> Marc-André Lureau (2):
>   clipboard: do not release between client grabs
>   clipboard: do not release between remote grabs
> 
>  src/spice-gtk-session.c | 101 +++-
>  1 file changed, 80 insertions(+), 21 deletions(-)
> 
> -- 
> 2.21.0.4.g36eb1cb9cf
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH spice-gtk 0/2] clipboard: skip release between grabs

2019-03-21 Thread marcandre . lureau
From: Marc-André Lureau 

Hi,

There has been several reports of clipboard issues that seem related
to clipboard managers interactions. Although it's not crystal clear
what are the problems, we realized the spice protocol does't handle
well conflicting grabs coming simultaneously from client and remote.
Each other believe the other side is the owner. This situation
is rare, but with a clipboard manager that reacts to release events,
it may be more easily reproducible.

Both agent & client send release between grabs today. This series
propose to stop releasing between grabs on client side, and adds a
0.5s delay for the release event coming from the agent side, to filter
out release between grabs.

Further protocol improvements should remove the need for a delay, and
solve the conflicting situation in all cases. This will come in a
future series.

Marc-André Lureau (2):
  clipboard: do not release between client grabs
  clipboard: do not release between remote grabs

 src/spice-gtk-session.c | 101 +++-
 1 file changed, 80 insertions(+), 21 deletions(-)

-- 
2.21.0.4.g36eb1cb9cf

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel