#10571: Tabs not showing properly in macOS full (and split) screen

Daniel xracoonx at gmx.de
Sun Aug 2 11:25:46 UTC 2020


On 2020-08-02 10:55, Stephan Witt wrote:
> Am 01.08.2020 um 16:51 schrieb Stephan Witt <st.witt at gmx.net>:
>>
>> Am 01.08.2020 um 09:35 schrieb Daniel <xracoonx at gmx.de>:
>>>
>>> On 2020-08-01 09:32, Stephan Witt wrote:
>>>> Am 31.07.2020 um 07:13 schrieb Daniel <xracoonx at gmx.de>:
>>>>>
>>>>> On 2020-07-30 21:21, Stephan Witt wrote:
>>>>>> Am 29.07.2020 um 22:59 schrieb Daniel <xracoonx at gmx.de>:
>>>>>>>
>>>>>>> On 2020-07-29 21:03, Stephan Witt wrote:
>>>>>>>> Am 29.07.2020 um 10:15 schrieb LyX Ticket Tracker <trac at lyx.org>:
>>>>>>>>>
>>>>>>>>> #10571: Tabs not showing properly in macOS full (and split) screen
>>>>>>>>> -----------------------+-------------------------
>>>>>>>>> Reporter:  racoon     |       Owner:  lasgouttes
>>>>>>>>>     Type:  defect     |      Status:  new
>>>>>>>>> Priority:  normal     |   Milestone:
>>>>>>>>> Component:  general    |     Version:  2.2.2
>>>>>>>>> Severity:  normal     |  Resolution:
>>>>>>>>> Keywords:  os=macosx  |
>>>>>>>>> -----------------------+-------------------------
>>>>>>>>>
>>>>>>>>> Comment (by racoon):
>>>>>>>>>
>>>>>>>>> Replying to [comment:8 stwitt]:
>>>>>>>>>> Replying to [comment:7 racoon]:
>>>>>>>>>>> Thanks. Yes, that is a better default given how LyX works currently.
>>>>>>>>> Still '''if''' one activates to hide things in fullscreen there is a bug.
>>>>>>>>> I'll try to take a look at it.
>>>>>>>>>>
>>>>>>>>>> What is the effect of the bug? Are you talking about a new problem?
>>>>>>>>>
>>>>>>>>> I am referring to the issue explained in comment:4. The bug is that UI
>>>>>>>>> elements don't disappear when the WM's fullscreen mode is activated (and
>>>>>>>>> the preferences set such that they should disappear). Quick steps to see
>>>>>>>>> it:
>>>>>>>>>
>>>>>>>>> 1. Make sure tabs are set to show in fullscreen mode
>>>>>>>>> 2. In normal mode create two new document (so the tabs will show)
>>>>>>>>> 3. Enter the WM's fullscreen mode (click on green maximize button)
>>>>>>>>> Result: The tabs are still there
>>>>>>>>> 4. Create another new document
>>>>>>>>> Result: The tabs disappear
>>>>>>>>>
>>>>>>>>> - Same for scrollbars.
>>>>>>>>> - Toolbars never disappear.
>>>>>>>>>
>>>>>>>>> So, the LyX's fullscreen mode seems not to be properly linked the WM's
>>>>>>>>> fullscreen mode.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ticket URL: <https://www.lyx.org/trac/ticket/10571#comment:9>
>>>>>>>>> The LyX Project <https://www.lyx.org/>
>>>>>>>>> LyX -- The Document Processor
>>>>>>>> The attached patch improves the situation on Mac. I’m confident that this is the right move.
>>>>>>>> But I’m unable to tell if it works on other platforms or if it breaks the current state.
>>>>>>>> Furthermore I’m not sure what to do with the remaining code in GuiView::toggleFullScreen().
>>>>>>>> Any comments on this, please?
>>>>>>>> Stephan
>>>>>>>
>>>>>>> Thanks. I see two strange things:
>>>>>>>
>>>>>>> 1. Toolbars get reset after disabling the WM's fullscreen
>>>>>>> Steps:
>>>>>>> 1.1 Move a toolbar to a non-default position
>>>>>>> 1.2 Enter the WM's fullscreen mode
>>>>>>> 1.3 leave the WM's fullscreen mode
>>>>>> Yes, the patch was not perfect. I posted it to get some feedback if the strategy works on other platforms.
>>>>>> I’ll improve it now I know it works in principle. Pavel tested it on Linux and saw some problems but confirmed it’s general function.
>>>>>>> 2. It is not possible to leave fullscreen using LyX's Fullscreen menu entry
>>>>>>> Steps:
>>>>>>> 2.1 Click on menu View > Fullscreen
>>>>>>> 2.2 Click again on menu View > Fullscreen
>>>>>> This one I cannot see. Here it simply works.
>>>>>
>>>>> Okay, tested again. It happens under a special condition: when the LyX window is previously maximized (not in fullscreen but maximized by double clicking the title bar). So:
>>>>>
>>>>> 1. Double click the title bar (maximizes the window)
>>>>
>>>> This one is configurable. Alternatively the double click sends it to the dock (minimize it).
>>>>
>>>>> 2. Click on View > Fullscreen (enters fullscreen)
>>>>> 3. Click on View > Fullscreen (exits fullscreen)
>>>>
>>>> I don’t understand what’s not working. It looks like maximizing the window is not full-screen.
>>>
>>> What I see here (Catalina) is that after existing the fullscreen via
>>> LyX's dedicated function (Step 3), the fullscreen is immediately
>>> re-activated. The only way to get out of it is using the WM's fullscreen
>>> button.
>>
>> I see. This isn’t the case with my latests (not published) patch anymore (hopefully).
> 
> Here is the current state of my patch to improve switch to/from full-screen.
> 
> It contains additional code to detect switch to/from window maximize state.
> This is actually not used yet. On Mac it could be a possibility to implement
> the switch to/from the state you’ve called „focus mode“. That’s why I left it
> as is ATM. The final patch will be without it and the maximize state can be done
> later. For now I’d like to ask Pavel how this is different and/or managed on Linux.
> Perhaps it doesn’t work the same way as on Mac.
> 
> Does it work as expected for you and on Linux? Can anyone test it on Windows, please?

Very nice!

You haven't asked explicitly for macOS feedback but I guess that is 
welcome as well. Seems to work almost perfectly on macOS now. There is 
one small exception: when doing the last three steps mentioned above, 
the window gets out of the maximized state. But it's really small. And 
maybe it's just a Qt bug.

(While reading the fullscreen code, I also noticed a little strangeness, 
but I guess it is not relevant here:

void GuiWorkArea::setFullScreen(bool full_screen)
{
	d->buffer_view_->setFullScreen(full_screen);
	setFrameStyle(QFrame::NoFrame);
	if (full_screen) {
		setFrameStyle(QFrame::NoFrame);
		if (lyxrc.full_screen_scrollbar)
			setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	} else
		setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
}

Isn't the frame style applied independent of full_screen?)

Daniel



More information about the lyx-devel mailing list