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 701883 - remove multi-screen support
remove multi-screen support
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-08 23:16 UTC by Christian Persch
Modified: 2014-08-29 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Removing multi-screen support (6.03 KB, patch)
2014-04-03 07:36 UTC, giselle
none Details | Review
Removes multi-screen support (4.33 KB, patch)
2014-04-03 22:53 UTC, giselle
reviewed Details | Review
Removes ev_display_open_if_needed (1.56 KB, patch)
2014-04-03 22:55 UTC, giselle
reviewed Details | Review
Removes get_num_monitors (1.63 KB, patch)
2014-04-03 22:56 UTC, giselle
committed Details | Review
removes multi-screen support (2.86 KB, patch)
2014-08-04 16:43 UTC, giselle
accepted-commit_now Details | Review

Description Christian Persch 2013-06-08 23:16:19 UTC
gdk_display_get_n_screens is deprecated in gtk 3.9 and will just return 1 always, so there's no need to be clever in trying to support 'multi-screen'.
Comment 1 giselle 2014-04-02 20:54:07 UTC
Hello,

I was looking into this and noticed one of the places gdk_display_get_n_screens is used is in the get_num_monitors function. This function, on the other hand, is not called anywhere else. Is it ok to submit a patch that also removes get_num_monitors?

Thank you!
Comment 2 Germán Poo-Caamaño 2014-04-02 23:12:25 UTC
Giselle,

That seems to be the point made by Christian.  So, please submit a patch. The worst case scenario could only be a review stating a better solution path.
Comment 3 giselle 2014-04-03 07:36:03 UTC
Created attachment 273505 [details] [review]
Removing multi-screen support

Removing calls to gdk_display_get_n_screens and related functions.
Comment 4 José Aliste 2014-04-03 13:44:29 UTC
Review of attachment 273505 [details] [review]:

::: shell/ev-application.c
@@ -118,3 @@
- * Returns: a #GdkDisplay of the display with the passed name.
- */
- *

Now Each GdkDisplay has only one GdkScreen attached to it. so, you should remove the use of gdk_screen_get_number... but I don't think you want to remove this whole function.

::: shell/ev-utils.c
@@ -281,3 @@
 
-/**
- * get_num_monitors: Get the number of user monitors.

if this is not used, then remove it in a different patch that only removes this function, so the patch can be pushed directly
Comment 5 giselle 2014-04-03 22:53:44 UTC
Created attachment 273555 [details] [review]
Removes multi-screen support

This patch only removes parts of the code related to the deprecated functions from gdk.
Comment 6 giselle 2014-04-03 22:55:22 UTC
Created attachment 273556 [details] [review]
Removes ev_display_open_if_needed

After removing multi-screen support, the function ev_display_open_if_needed is never called. This patch removes this from the code.
Comment 7 giselle 2014-04-03 22:56:08 UTC
Created attachment 273557 [details] [review]
Removes get_num_monitors

Removing another function that is not used.
Comment 8 Carlos Garcia Campos 2014-08-03 11:37:25 UTC
Review of attachment 273555 [details] [review]:

I don't think we can remove the display option, we can remove the screen one, and use gdk_display_get_default_screen().
Comment 9 Carlos Garcia Campos 2014-08-03 11:38:34 UTC
Review of attachment 273556 [details] [review]:

Same here, the display option is valid I think, you might want to run evince in a different display.
Comment 10 Carlos Garcia Campos 2014-08-03 11:39:23 UTC
Review of attachment 273557 [details] [review]:

Yes, this can be removed after removing all the callers.
Comment 11 giselle 2014-08-04 16:01:52 UTC
Comment on attachment 273557 [details] [review]
Removes get_num_monitors

Pushed, thanks!
Comment 12 giselle 2014-08-04 16:43:08 UTC
Created attachment 282465 [details] [review]
removes multi-screen support

Thank you for reviewing!

I modified the patch and left the display (removing only the support for multiple screens). I have two questions:

1. I am working with a laptop and an external screen attached (hdmi). This means that there are two displays, right? In this case, how can I test evince to see if it supports multiple displays?

2. If I open evince on display 1, once I select a document on recent view it opens on display 2. Is this the intended behavior?
Comment 13 Carlos Garcia Campos 2014-08-29 15:36:05 UTC
Comment on attachment 282465 [details] [review]
removes multi-screen support

Looks good, thanks!
Comment 14 giselle 2014-08-29 17:47:44 UTC
Pushed to master! Thanks :)