Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-15 Thread Jean-Marc Lasgouttes

Le 15/05/2018 à 06:08, Richard Kimberly Heck a écrit :

+   // Do not trigger the painting machinery if we are not ready (see
+   // bug #10989). However, since macOS has turned the screen back at


"black", I take it.


Indeed. I pushed the patch to master.

JMarc


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-14 Thread Richard Kimberly Heck
On 05/14/2018 03:50 AM, Jean-Marc Lasgouttes wrote:
> diff --git a/src/frontends/qt4/GuiWorkArea.cpp 
> b/src/frontends/qt4/GuiWorkArea.cpp
> index 7c80fcc..8dc0739 100644
> --- a/src/frontends/qt4/GuiWorkArea.cpp
> +++ b/src/frontends/qt4/GuiWorkArea.cpp
> @@ -1247,9 +1247,14 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter 
> & pain)
>  
>  void GuiWorkArea::paintEvent(QPaintEvent * ev)
>  {
> - // Hopefully fixes bug #10989.
> - if (view().busy())
> + // Do not trigger the painting machinery if we are not ready (see
> + // bug #10989). However, since macOS has turned the screen back at

"black", I take it.

Riki



Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-14 Thread Joel Kulesza
On Mon, May 14, 2018 at 1:50 AM, Jean-Marc Lasgouttes 
wrote:

> Le 13/05/2018 à 04:07, Richard Kimberly Heck a écrit :
>
>> Right, in that case, we do reload. So we'll have to request an explicit
>> redraw of the screen,
>> and I suppose a reload of the dialogs, etc.
>>
>> I'm not sure how to do that, but either I'll figure it out or someone
>> will tell me.
>>
>
> What about this patch?
>

Applying the attached patch to 45fba1ce1b fixes the problem I showed: the
work area now doesn't disappear on save.

Thanks,
Joel


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-14 Thread Jean-Marc Lasgouttes

Le 13/05/2018 à 04:07, Richard Kimberly Heck a écrit :
Right, in that case, we do reload. So we'll have to request an explicit 
redraw of the screen,

and I suppose a reload of the dialogs, etc.

I'm not sure how to do that, but either I'll figure it out or someone 
will tell me.


What about this patch?

JMarc


From e6f1e54238b0ca51ccc2d7c288d7f1c83f44734b Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Mon, 14 May 2018 09:46:54 +0200
Subject: [PATCH] Avoid black screen on macOS

When paintEvent is triggered on macOS, the least we can do is to copy
our backing store to the screen.
---
 src/frontends/qt4/GuiWorkArea.cpp | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp
index 7c80fcc..8dc0739 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -1247,9 +1247,14 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter & pain)
 
 void GuiWorkArea::paintEvent(QPaintEvent * ev)
 {
-	// Hopefully fixes bug #10989.
-	if (view().busy())
+	// Do not trigger the painting machinery if we are not ready (see
+	// bug #10989). However, since macOS has turned the screen back at
+	// this point, copy our backing store to screen.
+	if (view().busy()) {
+		d->updateScreen(ev->rect());
+		ev->accept();
 		return;
+	}
 
 	// LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
 	//	<< " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height());
-- 
2.7.4



Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Richard Kimberly Heck
On 05/12/2018 09:52 PM, Joel Kulesza wrote:
>
>
> On Sat, May 12, 2018 at 7:30 PM, Richard Kimberly Heck
> mailto:rikih...@lyx.org>> wrote:
>
> On 05/12/2018 06:29 PM, Joel Kulesza wrote:
>> On Sat, May 12, 2018 at 9:04 AM, Jean-Marc Lasgouttes
>> mailto:lasgout...@lyx.org>> wrote:
>>
>> Le 12 mai 2018 16:32:09 GMT+02:00, Joel Kulesza
>> mailto:jkule...@gmail.com>> a écrit :
>>
>> LyX Developers,
>>
>> New and exciting behavior here—I wonder if others have
>> observed this (maybe a macOS issue?).
>>
>> Please see https://youtu.be/4qM86HmpDz4
>> 
>>
>> This is from LyX compiled from master at ada97b5161.
>>
>> Please let me know if/how you'd like me to proceed
>> (additional debugging info, git bisect, etc.).
>>
>> Thanks,
>> Joel
>>
>>
>> It is almostcertainly my fault but a bisect could help.
>>
>> JMarc
>>
>>
>> You may be off the hook; I see upon a complete git bisect
>> starting at dd2efe8d0d:
>>
>> 8740 jkulesza@tempest[~/GIT/lyx]> g bisect good
>> 19e6977b5b527ec8311da35d8f0a40d6fd509080 is the first bad commit
>> commit 19e6977b5b527ec8311da35d8f0a40d6fd509080
>> Author: Richard Kimberly Heck > >
>> Date:   Wed Apr 25 23:46:13 2018 -0400
>>
>>     Try to fix bug #10989.
>>
>>     The problem is that popping dialogs during reload can cause paint
>>     events for which we are not ready. If this does not work, then we
>>     can introduce a new flag, besides 'busy', for that case. But busy
>>     does not seem to be used very widely, so hopefully this works.
>>
>> :04 04 5ee9f1ef0a75692839e2634baa8c70c8539f9378
>> 27bf85d3eafed6a5790a723dec226c29ffdf1c55 Msrc 
>>
>> If this seems amiss, please let me know how you'd like me to proceed.
>
> There was a concern that this might cause other problems.
>
> So it's after saving that you get a failure to redraw? We probably
> reload then, so may need
> to call for a redraw after that.
>
>
> That's correct.  I can use the save dialog to name the file to be
> saved.  Once the dialog is dismissed (I only tested with acceptance,
> not cancellation), the work area vanishes.

Right, in that case, we do reload. So we'll have to request an explicit
redraw of the screen,
and I suppose a reload of the dialogs, etc.

I'm not sure how to do that, but either I'll figure it out or someone
will tell me.

Riki



Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Joel Kulesza
On Sat, May 12, 2018 at 7:30 PM, Richard Kimberly Heck 
wrote:

> On 05/12/2018 06:29 PM, Joel Kulesza wrote:
>
> On Sat, May 12, 2018 at 9:04 AM, Jean-Marc Lasgouttes 
> wrote:
>
>> Le 12 mai 2018 16:32:09 GMT+02:00, Joel Kulesza  a
>> écrit :
>>>
>>> LyX Developers,
>>>
>>> New and exciting behavior here—I wonder if others have observed this
>>> (maybe a macOS issue?).
>>>
>>> Please see https://youtu.be/4qM86HmpDz4
>>>
>>> This is from LyX compiled from master at ada97b5161.
>>>
>>> Please let me know if/how you'd like me to proceed (additional debugging
>>> info, git bisect, etc.).
>>>
>>> Thanks,
>>> Joel
>>>
>>
>> It is almostcertainly my fault but a bisect could help.
>>
>> JMarc
>>
>
> You may be off the hook; I see upon a complete git bisect starting at
> dd2efe8d0d:
>
> 8740 jkulesza@tempest[~/GIT/lyx]> g bisect good
> 19e6977b5b527ec8311da35d8f0a40d6fd509080 is the first bad commit
> commit 19e6977b5b527ec8311da35d8f0a40d6fd509080
> Author: Richard Kimberly Heck 
> Date:   Wed Apr 25 23:46:13 2018 -0400
>
> Try to fix bug #10989.
>
> The problem is that popping dialogs during reload can cause paint
> events for which we are not ready. If this does not work, then we
> can introduce a new flag, besides 'busy', for that case. But busy
> does not seem to be used very widely, so hopefully this works.
>
> :04 04 5ee9f1ef0a75692839e2634baa8c70c8539f9378
> 27bf85d3eafed6a5790a723dec226c29ffdf1c55 M src
>
> If this seems amiss, please let me know how you'd like me to proceed.
>
>
> There was a concern that this might cause other problems.
>
> So it's after saving that you get a failure to redraw? We probably reload
> then, so may need
> to call for a redraw after that.
>

That's correct.  I can use the save dialog to name the file to be saved.
Once the dialog is dismissed (I only tested with acceptance, not
cancellation), the work area vanishes.

- Joel


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Richard Kimberly Heck
On 05/12/2018 06:29 PM, Joel Kulesza wrote:
> On Sat, May 12, 2018 at 9:04 AM, Jean-Marc Lasgouttes
> mailto:lasgout...@lyx.org>> wrote:
>
> Le 12 mai 2018 16:32:09 GMT+02:00, Joel Kulesza
> mailto:jkule...@gmail.com>> a écrit :
>
> LyX Developers,
>
> New and exciting behavior here—I wonder if others have
> observed this (maybe a macOS issue?).
>
> Please see https://youtu.be/4qM86HmpDz4
> 
>
> This is from LyX compiled from master at ada97b5161.
>
> Please let me know if/how you'd like me to proceed (additional
> debugging info, git bisect, etc.).
>
> Thanks,
> Joel
>
>
> It is almostcertainly my fault but a bisect could help.
>
> JMarc
>
>
> You may be off the hook; I see upon a complete git bisect starting at
> dd2efe8d0d:
>
> 8740 jkulesza@tempest[~/GIT/lyx]> g bisect good
> 19e6977b5b527ec8311da35d8f0a40d6fd509080 is the first bad commit
> commit 19e6977b5b527ec8311da35d8f0a40d6fd509080
> Author: Richard Kimberly Heck mailto:rikih...@lyx.org>>
> Date:   Wed Apr 25 23:46:13 2018 -0400
>
>     Try to fix bug #10989.
>
>     The problem is that popping dialogs during reload can cause paint
>     events for which we are not ready. If this does not work, then we
>     can introduce a new flag, besides 'busy', for that case. But busy
>     does not seem to be used very widely, so hopefully this works.
>
> :04 04 5ee9f1ef0a75692839e2634baa8c70c8539f9378
> 27bf85d3eafed6a5790a723dec226c29ffdf1c55 Msrc 
>
> If this seems amiss, please let me know how you'd like me to proceed.

There was a concern that this might cause other problems.

So it's after saving that you get a failure to redraw? We probably
reload then, so may need
to call for a redraw after that.

Riki



Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Joel Kulesza
On Sat, May 12, 2018 at 9:04 AM, Jean-Marc Lasgouttes 
wrote:

> Le 12 mai 2018 16:32:09 GMT+02:00, Joel Kulesza  a
> écrit :
>>
>> LyX Developers,
>>
>> New and exciting behavior here—I wonder if others have observed this
>> (maybe a macOS issue?).
>>
>> Please see https://youtu.be/4qM86HmpDz4
>>
>> This is from LyX compiled from master at ada97b5161.
>>
>> Please let me know if/how you'd like me to proceed (additional debugging
>> info, git bisect, etc.).
>>
>> Thanks,
>> Joel
>>
>
> It is almostcertainly my fault but a bisect could help.
>
> JMarc
>

You may be off the hook; I see upon a complete git bisect starting at
dd2efe8d0d:

8740 jkulesza@tempest[~/GIT/lyx]> g bisect good
19e6977b5b527ec8311da35d8f0a40d6fd509080 is the first bad commit
commit 19e6977b5b527ec8311da35d8f0a40d6fd509080
Author: Richard Kimberly Heck 
Date:   Wed Apr 25 23:46:13 2018 -0400

Try to fix bug #10989.

The problem is that popping dialogs during reload can cause paint
events for which we are not ready. If this does not work, then we
can introduce a new flag, besides 'busy', for that case. But busy
does not seem to be used very widely, so hopefully this works.

:04 04 5ee9f1ef0a75692839e2634baa8c70c8539f9378
27bf85d3eafed6a5790a723dec226c29ffdf1c55 M src

If this seems amiss, please let me know how you'd like me to proceed.

Thanks,
Joel


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Scott Kostyshak
On Sat, May 12, 2018 at 02:32:09PM +, Joel Kulesza wrote:
> LyX Developers,
> 
> New and exciting behavior here—

This could be a new feature. It's often said that a good word processor
should get out of your way :)

> I wonder if others have observed this (maybe
> a macOS issue?).

I don't see this on Ubuntu.

Scott


signature.asc
Description: PGP signature


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Kornel Benko
Am Samstag, 12. Mai 2018 08:32:09 CEST schrieb Joel Kulesza 
:
> LyX Developers,
> 
> New and exciting behavior here—I wonder if others have observed this (maybe
> a macOS issue?).
> 
> Please see https://youtu.be/4qM86HmpDz4
> 
> This is from LyX compiled from master at ada97b5161.
> 
> Please let me know if/how you'd like me to proceed (additional debugging
> info, git bisect, etc.).
> 
> Thanks,
> Joel
> 

I don't see it. Linux, qt5.6.1, same commit.

Kornel



signature.asc
Description: This is a digitally signed message part.


Re: LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Jean-Marc Lasgouttes
Le 12 mai 2018 16:32:09 GMT+02:00, Joel Kulesza  a écrit :
>LyX Developers,
>
>New and exciting behavior here—I wonder if others have observed this
>(maybe
>a macOS issue?).
>
>Please see https://youtu.be/4qM86HmpDz4
>
>This is from LyX compiled from master at ada97b5161.
>
>Please let me know if/how you'd like me to proceed (additional
>debugging
>info, git bisect, etc.).
>
>Thanks,
>Joel

It is almostcertainly my fault but a bisect could help.

JMarc

LyX master Work Area Disappears on Initial Save (Redraw issue?)

2018-05-12 Thread Joel Kulesza
LyX Developers,

New and exciting behavior here—I wonder if others have observed this (maybe
a macOS issue?).

Please see https://youtu.be/4qM86HmpDz4

This is from LyX compiled from master at ada97b5161.

Please let me know if/how you'd like me to proceed (additional debugging
info, git bisect, etc.).

Thanks,
Joel