After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 742747 - preview-mode: when in fullscreen, ESC should not bring to overview
preview-mode: when in fullscreen, ESC should not bring to overview
Status: RESOLVED DUPLICATE of bug 756131
Product: gnome-photos
Classification: Applications
Component: general
3.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-01-11 11:40 UTC by Pranav Kant
Modified: 2015-10-12 15:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ESC on fullscreen preview brings back to !fullscreen preview, ESC on preview brings back to overview (1.90 KB, patch)
2015-03-08 10:10 UTC, Kunaal Jain
none Details | Review
ESC on fullscreen preview brings back to !fullscreen preview (1.68 KB, patch)
2015-03-08 13:26 UTC, Kunaal Jain
none Details | Review
ESC on preview brings back to overview (946 bytes, patch)
2015-03-08 13:46 UTC, Kunaal Jain
rejected Details | Review
ESC on fullscreen preview brings back to !fullscreen preview (1.66 KB, patch)
2015-03-08 16:09 UTC, Kunaal Jain
none Details | Review
ESC on fullscreen preview brings back to !fullscreen preview (1.66 KB, patch)
2015-03-08 17:24 UTC, Kunaal Jain
none Details | Review
ESC on fullscreen preview brings back to !fullscreen preview (1.71 KB, patch)
2015-03-08 17:27 UTC, Kunaal Jain
rejected Details | Review

Description Pranav Kant 2015-01-11 11:40:22 UTC
First of all, there is no way to fullscreen or !fullscreen the application in overview mode, the application can only be made fullscreen in preview mode which makes sense as it might be design decision.

You can fullscreen the application in preview mode by pressing F11. To !fullscreen the application, currently we have to press F11 again, pressing ESC should also bring it back to !fullscreen mode. 

Application can get stuck in following situation.
Currently when in preview mode, pressing ESC brings the application to overview mode after which there is no way to !fullscreen the application (pressing F11 doesn't work here, ESC works neither), it stucks in fullscreen forever in overview mode unless you go again to preview mode and press F11 to switch to !fullscreen mode.
Comment 1 Kunaal Jain 2015-03-08 10:10:57 UTC
Created attachment 298801 [details] [review]
ESC on fullscreen preview brings back to !fullscreen preview, ESC on preview brings back to overview

Tested it. Couldn't find any bugs introduced due to this. Please review.
Comment 2 Pranav Kant 2015-03-08 10:26:53 UTC
Review of attachment 298801 [details] [review]:

Good work overall ! 
However few points to be noted.

Your commit message subject is too long. 
"First line (the brief description) must only be one sentence and should start with a capital letter."
It should be also be less than 72 characters.
See: https://wiki.gnome.org/Git/CommitMessages

Secondly, lets use a separate patch for new feature additions. You should only solve one problem in one patch.

Besides that, I also noted some minor nitpicks as mentioned below.

::: src/photos-main-window.c
@@ +229,3 @@
+{
+	PhotosMainWindowPrivate *priv = self->priv;
+  	gboolean fullscreen;

nitpick: We use space to separate variable declarations with rest of the code. Lets follow the convention.

@@ +234,3 @@
+  	{
+        gtk_window_unfullscreen (GTK_WINDOW (self));
+        photos_mode_controller_set_fullscreen(priv->mode_cntrlr,FALSE);

nitpick: Use space to separate arguments i.e use space after comma.
nitpick: fix the indentations.

@@ +258,3 @@
     case GDK_KEY_Escape:
+      photos_main_window_handle_esc_key(self);
+      handled=TRUE;

nitpick: Please note that there should be a space before the opening bracket.
Similarly, there should be a space to both sides of =, as in other assignments.
Comment 3 Kunaal Jain 2015-03-08 13:08:39 UTC
Thanks for the review. For the feature addition, the patch depends on the earlier patch. Also, should I open new bug for the feature addition?
Comment 4 Pranav Kant 2015-03-08 13:10:32 UTC
(In reply to Kunaal Jain from comment #3)
> Thanks for the review. For the feature addition, the patch depends on the
> earlier patch. Also, should I open new bug for the feature addition?

Yeah, no problem if your patch depends on earlier patch. You can separate the feature addition part and attach it here itself.
Comment 5 Kunaal Jain 2015-03-08 13:26:56 UTC
Created attachment 298809 [details] [review]
ESC on fullscreen preview brings back to !fullscreen preview

When in fullscreen and preview mode, pressing ESC brings back to overview mode and gets stuck in fullscreen mode there. This fixes it.
Comment 6 Kunaal Jain 2015-03-08 13:46:23 UTC
Created attachment 298812 [details] [review]
ESC on preview brings back to overview

This patch depends on the patch submitted earlier.
Comment 7 Kunaal Jain 2015-03-08 13:48:25 UTC
Summary of the two patches :

Instead of handling the ESC key in photos_main_window_handle_key_preview function, I created a function to handle ESC key when pressed on preview mode. If fullscreen, then unfullscreen. Otherwise go back to overview mode.
Comment 8 Pranav Kant 2015-03-08 15:46:30 UTC
Review of attachment 298809 [details] [review]:

See: https://wiki.gnome.org/Git/CommitMessages
Your description should be wrapped in under 72 characters.

From the link :
"Each line in main description must not exceed 72 characters (there is no limit on number of lines)."
Comment 9 Kunaal Jain 2015-03-08 16:09:53 UTC
Created attachment 298815 [details] [review]
ESC on fullscreen preview brings back to !fullscreen preview

When in fullscreen and preview mode, pressing ESC brings back to overview mode and gets stuck in fullscreen mode there.
This fixes it
Comment 10 Pranav Kant 2015-03-08 16:12:44 UTC
Review of attachment 298815 [details] [review]:

Sorry, didn't notice it earlier. The commit message (first line) doesn't end with a dot (so remove '.' after "preview")

Sorry for being too pedantic, these are given in guidelines. :)
Comment 11 Kunaal Jain 2015-03-08 17:24:47 UTC
Created attachment 298818 [details] [review]
ESC on fullscreen preview brings back to !fullscreen preview

When in fullscreen and preview mode, pressing ESC brings back to overview mode and gets stuck in fullscreen mode there.
This fixes it
Comment 12 Kunaal Jain 2015-03-08 17:27:33 UTC
Created attachment 298819 [details] [review]
ESC on fullscreen preview brings back to !fullscreen preview

When in fullscreen and preview mode, pressing ESC brings back to overview mode and gets stuck in fullscreen mode there.
This fixes it
Comment 13 Kunaal Jain 2015-03-08 17:28:47 UTC
No its alright. My bad. I should have read them carefully.
Comment 14 Miguel Vaello Martínez 2015-05-25 17:08:56 UTC
Other issue, is not possible to exit from the fullscreen mode if you are in overview mode. You have to select a pic and then if you press F11 let you exit from the fullscreen, but not before.
Comment 15 Claudio Saavedra 2015-07-11 08:06:35 UTC
(In reply to Miguel Vaello Martínez from comment #14)
> Other issue, is not possible to exit from the fullscreen mode if you are in
> overview mode. You have to select a pic and then if you press F11 let you
> exit from the fullscreen, but not before.

This is a terrible usability issue, please file it as a separate bug.
Comment 16 Debarshi Ray 2015-10-12 15:26:15 UTC
(In reply to Pranav Kant from comment #0)
> First of all, there is no way to fullscreen or !fullscreen the application
> in overview mode, the application can only be made fullscreen in preview
> mode which makes sense as it might be design decision.

The expected behaviour is:
  - Unless you are forcing a fullscreen through the window manager (see bug 725508), you can only fullscreen while in the preview.
  - F11 will toggle the fullscreen state, but leave you in the preview.
  - Only when fullscreened, ESC will take you back to the overview and unfullscreen.
  - Alt+<back> will always take you back to the overview and unfullscreen if needed.

> You can fullscreen the application in preview mode by pressing F11. To
> !fullscreen the application, currently we have to press F11 again, pressing
> ESC should also bring it back to !fullscreen mode. 
> 
> Application can get stuck in following situation.
> Currently when in preview mode, pressing ESC brings the application to
> overview mode after which there is no way to !fullscreen the application
> (pressing F11 doesn't work here, ESC works neither), it stucks in fullscreen
> forever in overview mode unless you go again to preview mode and press F11
> to switch to !fullscreen mode.

There were some bugs in our fullscreen handling code (see bug 725508 and bug 756131) which had earlier been fixed in gnome-documents (makes sense because they share the same origin). I have now cherry-picked them to master, gnome-3-18 and gnome-3-16. Therefore, things should be working as expected.

If you think the expected behaviour is not reasonable, then I would suggest filing a bug against gnome-documents for wider discussion because that is where the behaviour originated from and I would like to keep them consistent.

If you think that it is not behaving as expected, then please file a new bug against gnome-photos.
Comment 17 Debarshi Ray 2015-10-12 15:26:29 UTC

*** This bug has been marked as a duplicate of bug 756131 ***