From 59038e048c4be1e69744b087ba31386e98141a8f Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 8 Apr 2013 08:17:23 +0200 Subject: fontconfig libXau mesa xserver xkeyboard-config git update 8 Apr 2013 xserver commit 8928f8fa0bb154ce437af703ff702016f0dcf127 xkeyboard-config commit e5c6729f3679fe87a703eb1d7ec1cf0a61814ca8 libXau commit f5a57d8a21a34d7084cce294e24c0422e02ef8ef fontconfig commit 18bf57c70aafcad031c0b43756b754dcaf6a756a mesa commit eff66bc9f855fff5c4f5f57f247254a97431e8ad --- xorg-server/hw/kdrive/fbdev/fbdev.c | 18 +++++ xorg-server/hw/xfree86/man/xorg.conf.man | 11 +++ xorg-server/hw/xfree86/modes/xf86Crtc.c | 89 ++++++++++++++++++++++ xorg-server/xkeyboard-config/symbols/gb | 3 +- .../xkeyboard-config/symbols/macintosh_vndr/gb | 4 +- xorg-server/xkeyboard-config/symbols/md | 2 +- 6 files changed, 124 insertions(+), 3 deletions(-) (limited to 'xorg-server') diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.c b/xorg-server/hw/kdrive/fbdev/fbdev.c index fb6e3a292..d6fcf1a5f 100644 --- a/xorg-server/hw/kdrive/fbdev/fbdev.c +++ b/xorg-server/hw/kdrive/fbdev/fbdev.c @@ -465,6 +465,20 @@ fbdevRandRSetConfig(ScreenPtr pScreen, int oldheight; int oldmmwidth; int oldmmheight; + int newwidth, newheight, newmmwidth, newmmheight; + + if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) { + newwidth = pSize->width; + newheight = pSize->height; + newmmwidth = pSize->mmWidth; + newmmheight = pSize->mmHeight; + } + else { + newwidth = pSize->height; + newheight = pSize->width; + newmmwidth = pSize->mmHeight; + newmmheight = pSize->mmWidth; + } if (wasEnabled) KdDisableScreen(pScreen); @@ -481,6 +495,10 @@ fbdevRandRSetConfig(ScreenPtr pScreen, */ scrpriv->randr = KdAddRotation(screen->randr, randr); + pScreen->width = newwidth; + pScreen->height = newheight; + pScreen->mmWidth = newmmwidth; + pScreen->mmHeight = newmmheight; fbdevUnmapFramebuffer(screen); diff --git a/xorg-server/hw/xfree86/man/xorg.conf.man b/xorg-server/hw/xfree86/man/xorg.conf.man index 9361ce978..67d8594fb 100644 --- a/xorg-server/hw/xfree86/man/xorg.conf.man +++ b/xorg-server/hw/xfree86/man/xorg.conf.man @@ -1676,6 +1676,17 @@ This optional entry specifies a mode to be marked as the preferred initial mode of the monitor. (RandR 1.2-supporting drivers only) .TP 7 +.BI "Option \*qZoomModes\*q \*q" name " " name " " ... \*q +This optional entry specifies modes to be marked as zoom modes. +It is possible to switch to the next and previous mode via +.BR Ctrl+Alt+Keypad\-Plus " and " Ctrl+Alt+Keypad\-Minus . +All these keypad available modes are selected from the screen mode list. +This list is a copy of the compatibility output monitor mode list. +Since this output is the output connected to the lowest +dot-area monitor, as determined from its largest size mode, that +monitor defines the available zoom modes. +(RandR 1.2-supporting drivers only) +.TP 7 .BI "Option \*qPosition\*q \*q" x " " y \*q This optional entry specifies the position of the monitor within the X screen. diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index f9ae46596..e4b393cb1 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -428,6 +428,7 @@ extern XF86ConfigPtr xf86configptr; typedef enum { OPTION_PREFERRED_MODE, + OPTION_ZOOM_MODES, OPTION_POSITION, OPTION_BELOW, OPTION_RIGHT_OF, @@ -446,6 +447,7 @@ typedef enum { static OptionInfoRec xf86OutputOptions[] = { {OPTION_PREFERRED_MODE, "PreferredMode", OPTV_STRING, {0}, FALSE}, + {OPTION_ZOOM_MODES, "ZoomModes", OPTV_STRING, {0}, FALSE }, {OPTION_POSITION, "Position", OPTV_STRING, {0}, FALSE}, {OPTION_BELOW, "Below", OPTV_STRING, {0}, FALSE}, {OPTION_RIGHT_OF, "RightOf", OPTV_STRING, {0}, FALSE}, @@ -1418,6 +1420,90 @@ preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output) return preferred_mode; } +/** identify a token + * args + * *src a string with zero or more tokens, e.g. "tok0 tok1", + * **token stores a pointer to the first token character, + * *len stores the token length. + * return + * a pointer into src[] at the token terminating character, or + * NULL if no token is found. + */ +static const char * +gettoken(const char *src, const char **token, int *len) +{ + const char *delim = " \t"; + int skip; + + if (!src) + return NULL; + + skip = strspn(src, delim); + *token = &src[skip]; + + *len = strcspn(*token, delim); + /* Support for backslash escaped delimiters could be implemented + * here. + */ + + /* (*token)[0] != '\0' <==> *len > 0 */ + if (*len > 0) + return &(*token)[*len]; + else + return NULL; +} + +/** Check for a user configured zoom mode list, Option "ZoomModes": + * + * Section "Monitor" + * Identifier "a21inch" + * Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" + * EndSection + * + * Each user mode name is searched for independently so the list + * specification order is free. An output mode is matched at most + * once, a mode with an already set M_T_USERDEF type bit is skipped. + * Thus a repeat mode name specification matches the next output mode + * with the same name. + * + * Ctrl+Alt+Keypad-{Plus,Minus} zooms {in,out} by selecting the + * {next,previous} M_T_USERDEF mode in the screen modes list, itself + * sorted toward lower dot area or lower dot clock frequency, see + * modes/xf86Crtc.c: xf86SortModes() xf86SetScrnInfoModes(), and + * common/xf86Cursor.c: xf86ZoomViewport(). + */ +static int +processZoomModes(xf86OutputPtr output) +{ + const char *zoom_modes; + int count = 0; + + zoom_modes = xf86GetOptValString(output->options, OPTION_ZOOM_MODES); + + if (zoom_modes) { + const char *token, *next; + int len; + + next = gettoken(zoom_modes, &token, &len); + while (next) { + DisplayModePtr mode; + + for (mode = output->probed_modes; mode; mode = mode->next) + if (!strncmp(token, mode->name, len) /* prefix match */ + && mode->name[len] == '\0' /* equal length */ + && !(mode->type & M_T_USERDEF)) { /* no rematch */ + mode->type |= M_T_USERDEF; + break; + } + + count++; + next = gettoken(next, &token, &len); + } + } + + return count; +} + static void GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) { @@ -1713,6 +1799,9 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) } } + /* Ctrl+Alt+Keypad-{Plus,Minus} zoom mode: M_T_USERDEF mode type */ + processZoomModes(output); + output->initial_rotation = xf86OutputInitialRotation(output); if (debug_modes) { diff --git a/xorg-server/xkeyboard-config/symbols/gb b/xorg-server/xkeyboard-config/symbols/gb index c7de8c33e..10372afcd 100644 --- a/xorg-server/xkeyboard-config/symbols/gb +++ b/xorg-server/xkeyboard-config/symbols/gb @@ -169,7 +169,8 @@ xkb_symbols "mac" { key { [ 2, at, EuroSign ] }; key { [ 3, sterling, numbersign ] }; - key { [ grave, asciitilde ] }; + key { [ section, plusminus ] }; + key { [ grave, asciitilde ] }; // End alphanumeric section diff --git a/xorg-server/xkeyboard-config/symbols/macintosh_vndr/gb b/xorg-server/xkeyboard-config/symbols/macintosh_vndr/gb index a6bc48e8c..4e4248561 100644 --- a/xorg-server/xkeyboard-config/symbols/macintosh_vndr/gb +++ b/xorg-server/xkeyboard-config/symbols/macintosh_vndr/gb @@ -4,12 +4,14 @@ xkb_symbols "basic" { // Describes the differences between a very simple en_US // keyboard and a very simple U.K. keyboard layout - include "latin" + include "macintosh_vndr/us" name[Group1]= "United Kingdom - Mac"; key { [ 2, at, EuroSign ] }; key { [ 3, sterling, numbersign ] }; + key { [ section, plusminus ] }; + key { [ grave, asciitilde ] }; // End alphanumeric section diff --git a/xorg-server/xkeyboard-config/symbols/md b/xorg-server/xkeyboard-config/symbols/md index 848fe05a7..f7700e930 100644 --- a/xorg-server/xkeyboard-config/symbols/md +++ b/xorg-server/xkeyboard-config/symbols/md @@ -38,7 +38,7 @@ name[Group1]="Moldavian (Gagauz)"; // Alphanumeric section key { [ grave, asciitilde ] }; key { [ 1, exclam ] }; - key { [ 2, quotedb1, at ] }; + key { [ 2, quotedbl, at ] }; key { [ 3, numbersign ] }; key { [ 4, semicolon, dollar ] }; key { [ 5, percent, EuroSign, cent ] }; -- cgit v1.2.3