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 311863 - virtual desktop (think 'viewport') size not used when computing size of pager
virtual desktop (think 'viewport') size not used when computing size of pager
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-28 14:25 UTC by Loïc Minier
Modified: 2005-12-19 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compute size of pager with virtual workspace size (1.35 KB, patch)
2005-10-08 16:34 UTC, Loïc Minier
committed Details | Review

Description Loïc Minier 2005-07-28 14:25:06 UTC
Hi,

Roger Gammans reported in Debian bug http://bugs.debian.org/319740 that he
experiences issues with the computing of the pager size.  He proposes the
following patch:
--- libwnck-2.8.1/libwnck/pager.c	2004-10-05 11:30:34.000000000 +0100
+++ libwnck-2.8.1-3/libwnck/pager.c	2005-07-24 12:19:30.000000000 +0100
@@ -267,7 +267,7 @@
   int size;
   int n_rows;
   int focus_width;
-  
+  WnckWorkspace *space;
   pager = WNCK_PAGER (widget);
   
   n_spaces = wnck_screen_get_workspace_count (pager->priv->screen);
@@ -275,9 +275,21 @@
   g_assert (pager->priv->n_rows > 0);
   spaces_per_row = (n_spaces + pager->priv->n_rows - 1) / pager->priv->n_rows;
  
+
+  space = wnck_screen_get_workspace(pager->priv->screen,0);
+  if (space) {
+	screen_aspect =
+        	(double) wnck_workspace_get_width (space) /
+	        (double) wnck_workspace_get_height (space);
+  } else {
+	  screen_aspect =
+        	(double) wnck_screen_get_width (pager->priv->screen) /
+	        (double) wnck_screen_get_height (pager->priv->screen);
+  }
+
+  
   if (pager->priv->orientation == GTK_ORIENTATION_VERTICAL)
     {
-      screen_aspect = (double) gdk_screen_height () / (double) gdk_screen_width ();
 
       /* TODO: Handle WNCK_PAGER_DISPLAY_NAME for this case */
 
@@ -300,10 +312,6 @@
     }
   else
     {
-      screen_aspect =
-        (double) wnck_screen_get_width (pager->priv->screen) /
-        (double) wnck_screen_get_height (pager->priv->screen);
-      
       if (pager->priv->show_all_workspaces)
 	{
 	  size = pager->priv->workspace_size;

I'll suggest he subscribes to this report.

Bye,
Comment 1 Elijah Newren 2005-10-08 16:07:59 UTC
Please attach patches using the "create an attachment" feature of bugzilla, so
that the patch tracking reports will pick it up...
Comment 2 Loïc Minier 2005-10-08 16:34:32 UTC
Created attachment 53231 [details] [review]
compute size of pager with virtual workspace size
Comment 3 Elijah Newren 2005-10-08 21:50:28 UTC
I think the patch makes sense; it was fixing the fact that virtual desktop size
is not equal to screen size when using viewports.  One minor nitpick, though;
instead of
  space = wnck_screen_get_workspace(pager->priv->screen,0);
it should be
  space = wnck_screen_get_workspace (pager->priv->screen, 0);
(look closely at the spacing).
Comment 4 Vincent Untz 2005-12-19 18:34:38 UTC
I committed a slightly modifier version (to handle vertical panels).