! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add fullscreen mode
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description Simon Steinbeiss editbugs 2013-01-10 20:10:34 CET
This would be a nice addition to Mousepad. Of course one can use the fullscreen-mode of xfwm4, but it's not the same (the menubar remains visible).

Check out gedit's fullscreen-mode (or ristretto's ftm), touching the top-border of the screen with the mouse reveals a toolbar.
Comment 1 Andre Miranda editbugs 2013-11-01 04:17:32 CET
Created attachment 5218 
Preliminary patch

I have prepared this patch taking as reference Ristretto code.
But there are some problems that I can't solve(I'm no GTK expert):
-The toolbar doesn't hide automatically, because notebook can't receive enter-notify-events(I guess).
-The fullscreen button in toolbar takes about 2 seconds to appear at first time.
-The toolbar separator doesn't expand.
-The code related to add the toolbar to the window(around line 670) causes some errors in mousepad_window_connect_proxy(check console).
Comment 2 Simon Steinbeiss editbugs 2013-11-01 16:45:15 CET
Hey, thanks a lot – that's a very good starting point!
(I can confirm the issues you listed though, but those seem manageable.)

Actually it might be helpful to have some items in that toolbar (e.g. open-document, save-document, etc.), what do you think?
Comment 3 Andre Miranda editbugs 2013-11-01 16:51:21 CET
(In reply to Simon Steinbeiss from comment #2)
> Actually it might be helpful to have some items in that toolbar (e.g.
> open-document, save-document, etc.), what do you think?

Indeed. I think basic actions like new file, open, save, undo/redo and maybe copy/cut/paste should be fine.
Comment 4 Simon Steinbeiss editbugs 2013-11-01 16:53:55 CET
Indeed, sounds good!
Comment 5 Andre Miranda editbugs 2013-11-01 17:03:05 CET
I forgot to ask: will you try to improve the patch? If you're too busy, please give hints to solve problems I mentioned.
Comment 6 Simon Steinbeiss editbugs 2013-11-02 18:34:52 CET
(In reply to André Miranda from comment #5)
> I forgot to ask: will you try to improve the patch? If you're too busy,
> please give hints to solve problems I mentioned.

Ok, just to clarify in advance, neither am I mousepad's developer or maintainer, nor am I really a coder.

We implemented the fullscreen-mode a bit differently in Parole, and I'm not familiar enough with Ristretto's code to be able to provide real guidance here.
Comment 7 Matthew Brush editbugs 2014-07-12 04:41:00 CEST
I added regular fullscreen support (ie. using gtk_window_fullscreen()) in http://git.xfce.org/apps/mousepad/commit/?id=a3a9517357d28aa6a7701fd600b5cfc327076ecb and a toolbar in http://git.xfce.org/apps/mousepad/commit/?id=2b5155971e93df04e85419fd56966eb01f15971a. I bet the rest of this bug (hiding the menubar and making the toolbar auto-hide) won't be so big/tricky now.
Comment 8 Andre Miranda editbugs 2014-07-15 02:30:02 CEST
Nice job Matt!

While testing, I noticed that the toolbar is not shown/hidden correctly:
1. Open mousepad
2. Go to fullscreen mode (F11)
3. Enable the toolbar (View->Toolbar)
4. Leave fullscreen mode (F11)
Notice that the toolbar is still displayed

5. Go to fulllscreen mode again
The toolbar is not being displayed.

6. Leave fullscreen mode
The toolbar is being displayed even though View->Toolbar is unchecked.
Comment 9 Theo Linkspfeifer editbugs 2019-05-27 22:26:36 CEST
Created attachment 8588 
patch

The attached patch should fix this problem. It is caused by querying the window status before fully entering or leaving fullscreen mode. Therefore, bar visibility is restored for the opposite mode.
Comment 10 Theo Linkspfeifer editbugs 2019-05-27 23:22:25 CEST
Created attachment 8590 
Fix return type of fullscreen settings
Comment 11 Theo Linkspfeifer editbugs 2019-05-29 13:59:47 CEST
Created attachment 8596 
patch v2

Slightly tweaked version of the patch.
Comment 12 Matthew Brush editbugs 2019-05-29 16:10:44 CEST
The 2nd patch looks nicer code-wise, but I'm not a big fan of magic numbers (200ms in first patch, 50ms in second). It seems like it might depend on the windowing server, graphics card, CPU speed, etc.
Comment 13 Theo Linkspfeifer editbugs 2019-05-29 16:20:52 CEST
I changed the priority to G_PRIORITY_DEFAULT_IDLE also. This and a delay of 50ms seem to work fine when testing with a slow VM.
Comment 14 Matthew Brush editbugs 2019-05-30 01:15:40 CEST
It might be interesting to see how other programs are dealing with this.
Comment 15 Maurizio Galli 2019-07-20 20:39:49 CEST
(In reply to Andre Miranda from comment #8)
> Nice job Matt!
> 
> While testing, I noticed that the toolbar is not shown/hidden correctly:
> 1. Open mousepad
> 2. Go to fullscreen mode (F11)
> 3. Enable the toolbar (View->Toolbar)
> 4. Leave fullscreen mode (F11)
> Notice that the toolbar is still displayed
> 
> 5. Go to fulllscreen mode again
> The toolbar is not being displayed.
> 
> 6. Leave fullscreen mode
> The toolbar is being displayed even though View->Toolbar is unchecked.

Tested the patch v2 in comment #11 and it fixes the issue in the steps above. Everything seems to be in sync with what is displayed.
Comment 16 Git Bot editbugs 2019-08-25 19:43:44 CEST
Theo Linkspfeifer referenced this bugreport in commit bba524f4132b5535189d4114faa7916ea9817084

Fix return type of fullscreen settings (Bug #9735)

https://git.xfce.org/apps/mousepad/commit?id=bba524f4132b5535189d4114faa7916ea9817084
Comment 17 Git Bot editbugs 2019-09-25 18:34:55 CEST
Theo Linkspfeifer referenced this bugreport in commit 0df544c677a66f47713381190ff8f098e8f63fa1

Change visibility of fullscreen bars after small delay (Bug #9735)

https://git.xfce.org/apps/mousepad/commit?id=0df544c677a66f47713381190ff8f098e8f63fa1
Comment 18 Andre Miranda editbugs 2019-09-25 18:36:05 CEST
Second patch pushed to master, if this causes problems we can always revert.

Bug #9735

Reported by:
Simon Steinbeiss
Reported on: 2013-01-10
Last modified on: 2019-09-25

People

Assignee:
Matthew Brush
CC List:
5 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Preliminary patch (13.04 KB, patch)
2013-11-01 04:17 CET , Andre Miranda
no flags
patch (3.60 KB, patch)
2019-05-27 22:26 CEST , Theo Linkspfeifer
no flags
Fix return type of fullscreen settings (1.90 KB, patch)
2019-05-27 23:22 CEST , Theo Linkspfeifer
no flags
patch v2 (3.35 KB, patch)
2019-05-29 13:59 CEST , Theo Linkspfeifer
no flags

Additional information