[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#853192: xfce4-panel: Patch to disable ratio of virtual workspace bigger than screen



Package: xfce4-panel
Version: 4.18.0-1
Followup-For: Bug #853192

Dear Maintainer,

The ratio bug seems to come back (#785582 has a patch worked before
4.18) that shows viewports in wrong proportion. This patch tries to
revert ratio to screen ratio when virtual workspace is bigger than
screen: see 03_pager-ratio-for-viewport.patch

-- System Information:
Debian Release: bookworm/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (300, 'stable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-6-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Index: xfce4-panel-4.18.0/plugins/pager/pager.c
===================================================================
--- xfce4-panel-4.18.0.orig/plugins/pager/pager.c
+++ xfce4-panel-4.18.0/plugins/pager/pager.c
@@ -505,7 +505,9 @@ pager_plugin_set_ratio (PagerPlugin *plu
       return;
     }
 
-  if (wnck_workspace_is_virtual (workspace))
+  if (wnck_workspace_is_virtual (workspace) && /* viewport smaller than screen */
+      wnck_workspace_get_width (workspace) < wnck_screen_get_width (plugin->wnck_screen) &&
+      wnck_workspace_get_height (workspace) < wnck_screen_get_height (plugin->wnck_screen))
     plugin->ratio = (gfloat) wnck_workspace_get_width (workspace)
                     / (gfloat) wnck_workspace_get_height (workspace);
   else

Reply to: