Bug 8618 - XF86VidModeSwitchMode does not wrap after reducing resolution via xrandr
Summary: XF86VidModeSwitchMode does not wrap after reducing resolution via xrandr
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.1 (2006.05)
Hardware: x86 (IA32) Linux (All)
: high minor
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-12 11:52 UTC by Evan Danaher
Modified: 2018-12-13 22:17 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Evan Danaher 2006-10-12 11:52:53 UTC
Switching video modes via Ctrl-Alt-+/- and xvidtune normally wraps around from
the largest to the smallest resolutions.  However, after switching to a lower
resolution using xrandr, this no longer happens - zooming out from the largest
resolution or in from the smallest does nothing.

I believe this is due to XF86VidModeSwitchMode attempting to switch a resolution
larger than the current server size set by xrandr; so it silently fails.  My
simple solution is to keep trying modes as long as the resolution does not
change; if no other resolution works, eventually it will wrap to the current
resolution and do nothing.

The following patch implements this change:

diff -pur xorg-server-1.1.1/hw/xfree86/common/xf86Cursor.c
xorg-server-1.1.1-mine/hw/xfree86/common/xf86Cursor.c
--- xorg-server-1.1.1/hw/xfree86/common/xf86Cursor.c  2006-07-05
14:31:40.000000000 -0400
+++ xorg-server-1.1.1-mine/hw/xfree86/common/xf86Cursor.c   2006-10-12
13:01:49.000000000 -0400
@@ -295,13 +295,17 @@ xf86ZoomViewport(ScreenPtr pScreen, int 
     return;

   do {
-    if (zoom > 0)
-      mode = mode->next;
-    else
-      mode = mode->prev;
-  } while (mode != pScr->currentMode && !(mode->type & M_T_USERDEF));
+     do {
+       if (zoom > 0)
+         mode = mode->next;
+       else
+         mode = mode->prev;
+     } while (mode != pScr->currentMode && !(mode->type & M_T_USERDEF));
+
+
+     (void)xf86SwitchMode(pScreen, mode);
+  } while(mode != pScr->currentMode);

-  (void)xf86SwitchMode(pScreen, mode);
 }
Comment 1 Daniel Stone 2007-02-27 01:34:02 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 chemtech 2013-03-15 15:07:40 UTC
Evan Danaher 
Do you still experience this issue with newer soft ?
Please check the status of your issue.
Comment 3 GitLab Migration User 2018-12-13 22:17:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/347.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.