aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.c7
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c18
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c22
-rw-r--r--xorg-server/randr/randrstr.h6
-rw-r--r--xorg-server/randr/rrprovider.c2
-rw-r--r--xorg-server/xkeyboard-config/rules/base.o_s.part7
-rw-r--r--xorg-server/xkeyboard-config/rules/base.xml.in42
-rw-r--r--xorg-server/xkeyboard-config/symbols/compose35
8 files changed, 126 insertions, 13 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c
index 0525e39bc..58663336a 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.c
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.c
@@ -438,7 +438,12 @@ xf86platformAddDevice(int index)
}
scr_index = AddGPUScreen(xf86GPUScreens[i]->ScreenInit, 0, NULL);
-
+ if (scr_index == -1) {
+ xf86DeleteScreen(xf86GPUScreens[i]);
+ xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
+ xf86NumGPUScreens = old_screens;
+ return -1;
+ }
dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates,
xf86ScreenKey, xf86GPUScreens[i]);
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index b3ded5a33..f9ae46596 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -743,16 +743,8 @@ xf86CrtcCloseScreen(ScreenPtr screen)
}
/* detach any providers */
if (config->randr_provider) {
- if (config->randr_provider->offload_sink) {
- DetachOffloadGPU(screen);
- config->randr_provider->offload_sink = NULL;
- }
- else if (config->randr_provider->output_source) {
- DetachOutputGPU(screen);
- config->randr_provider->output_source = NULL;
- }
- else if (screen->current_master)
- DetachUnboundGPU(screen);
+ RRProviderDestroy(config->randr_provider);
+ config->randr_provider = NULL;
}
return TRUE;
}
@@ -1848,8 +1840,10 @@ SetCompatOutput(xf86CrtcConfigPtr config)
}
/* All outputs are disconnected, select one to fake */
- if (!output && config->num_output)
- output = config->output[0];
+ if (!output && config->num_output) {
+ config->compat_output = 0;
+ output = config->output[config->compat_output];
+ }
return output;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index 3530abf24..01fc9c5e3 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -1885,6 +1885,27 @@ xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, i
}
}
+static void
+xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
+{
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ if (config->randr_provider == provider) {
+ if (config->randr_provider->offload_sink) {
+ DetachOffloadGPU(screen);
+ config->randr_provider->offload_sink = NULL;
+ }
+ else if (config->randr_provider->output_source) {
+ DetachOutputGPU(screen);
+ config->randr_provider->output_source = NULL;
+ }
+ else if (screen->current_master)
+ DetachUnboundGPU(screen);
+ }
+ config->randr_provider = NULL;
+}
+
static Bool
xf86RandR12Init12(ScreenPtr pScreen)
{
@@ -1914,6 +1935,7 @@ xf86RandR12Init12(ScreenPtr pScreen)
rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty;
rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty;
rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap;
+ rp->rrProviderDestroy = xf86RandR14ProviderDestroy;
pScrn->PointerMoved = xf86RandR12PointerMoved;
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h
index f52d0f284..25174798f 100644
--- a/xorg-server/randr/randrstr.h
+++ b/xorg-server/randr/randrstr.h
@@ -232,6 +232,9 @@ typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen,
RRProviderPtr offload_sink);
+typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen,
+ RRProviderPtr provider);
+
/* These are for 1.0 compatibility */
typedef struct _rrRefresh {
@@ -330,6 +333,9 @@ typedef struct _rrScrPriv {
Bool discontiguous;
RRProviderPtr provider;
+
+ RRProviderDestroyProcPtr rrProviderDestroy;
+
} rrScrPrivRec, *rrScrPrivPtr;
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
diff --git a/xorg-server/randr/rrprovider.c b/xorg-server/randr/rrprovider.c
index c4ed515d6..b321e6227 100644
--- a/xorg-server/randr/rrprovider.c
+++ b/xorg-server/randr/rrprovider.c
@@ -389,6 +389,8 @@ RRProviderDestroyResource (pointer value, XID pid)
{
rrScrPriv(pScreen);
+ if (pScrPriv->rrProviderDestroy)
+ (*pScrPriv->rrProviderDestroy)(pScreen, provider);
pScrPriv->provider = NULL;
}
free(provider);
diff --git a/xorg-server/xkeyboard-config/rules/base.o_s.part b/xorg-server/xkeyboard-config/rules/base.o_s.part
index 253effded..721291985 100644
--- a/xorg-server/xkeyboard-config/rules/base.o_s.part
+++ b/xorg-server/xkeyboard-config/rules/base.o_s.part
@@ -78,12 +78,19 @@
ctrl:ralt_rctrl = +ctrl(ralt_rctrl)
compose:ralt = +compose(ralt)
compose:lwin = +compose(lwin)
+ compose:lwin-altgr = +compose(lwin-altgr)
compose:rwin = +compose(rwin)
+ compose:rwin-altgr = +compose(rwin-altgr)
compose:menu = +compose(menu)
+ compose:menu-altgr = +compose(menu-altgr)
compose:lctrl = +compose(lctrl)
+ compose:lctrl-altgr = +compose(lctrl-altgr)
compose:rctrl = +compose(rctrl)
+ compose:rctrl-altgr = +compose(rctrl-altgr)
compose:caps = +compose(caps)
+ compose:caps-altgr = +compose(caps-altgr)
compose:102 = +compose(102)
+ compose:102-altgr = +compose(102-altgr)
compose:paus = +compose(paus)
compose:prsc = +compose(prsc)
compose:sclk = +compose(sclk)
diff --git a/xorg-server/xkeyboard-config/rules/base.xml.in b/xorg-server/xkeyboard-config/rules/base.xml.in
index 83dc894e2..95790dda8 100644
--- a/xorg-server/xkeyboard-config/rules/base.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.xml.in
@@ -6282,42 +6282,84 @@
</option>
<option>
<configItem>
+ <name>compose:lwin-altgr</name>
+ <_description>3rd level of Left Win</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:rwin</name>
<_description>Right Win</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:rwin-altgr</name>
+ <_description>3rd level of Right Win</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:menu</name>
<_description>Menu</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:menu-altgr</name>
+ <_description>3rd level of Menu</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:lctrl</name>
<_description>Left Ctrl</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:lctrl-altgr</name>
+ <_description>3rd level of Left Ctrl</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:rctrl</name>
<_description>Right Ctrl</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:rctrl-altgr</name>
+ <_description>3rd level of Right Ctrl</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:caps</name>
<_description>Caps Lock</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:caps-altgr</name>
+ <_description>3rd level of Caps Lock</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:102</name>
<_description>&lt;Less/Greater&gt;</_description>
</configItem>
</option>
<option>
<configItem>
+ <name>compose:102-altgr</name>
+ <_description>3rd level of &lt;Less/Greater&gt;</_description>
+ </configItem>
+ </option>
+ <option>
+ <configItem>
<name>compose:paus</name>
<_description>Pause</_description>
</configItem>
diff --git a/xorg-server/xkeyboard-config/symbols/compose b/xorg-server/xkeyboard-config/symbols/compose
index d7257329e..08446bf24 100644
--- a/xorg-server/xkeyboard-config/symbols/compose
+++ b/xorg-server/xkeyboard-config/symbols/compose
@@ -9,36 +9,71 @@ xkb_symbols "lwin" {
};
partial modifier_keys
+xkb_symbols "lwin-altgr" {
+ key <LWIN> { type[Group1]="FOUR_LEVEL", [ Super_L, Super_L, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "rwin" {
key <RWIN> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "rwin-altgr" {
+ key <RWIN> { type[Group1]="FOUR_LEVEL", [ Super_R, Super_R, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "menu" {
key <MENU> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "menu-altgr" {
+ key <MENU> { type[Group1]="FOUR_LEVEL", [ Menu, Menu, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "rctrl" {
key <RCTL> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "rctrl-altgr" {
+ key <RCTL> { type[Group1]="FOUR_LEVEL", [ Control_R, Control_R, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "lctrl" {
key <LCTL> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "lctrl-altgr" {
+ key <LCTL> { type[Group1]="FOUR_LEVEL", [ Control_L, Control_L, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "caps" {
key <CAPS> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "caps-altgr" {
+ key <CAPS> { type[Group1]="FOUR_LEVEL", [ Caps_Lock, Caps_Lock, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "102" {
key <LSGT> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};
partial modifier_keys
+xkb_symbols "102-altgr" {
+ key <LSGT> { type[Group1]="FOUR_LEVEL", [ less, greater, Multi_key, Multi_key ] };
+};
+
+partial modifier_keys
xkb_symbols "paus" {
key <PAUS> { type[Group1]="TWO_LEVEL", [ Multi_key, Multi_key ] };
};