aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xi/exevents.c38
-rw-r--r--xorg-server/config/udev.c2
-rw-r--r--xorg-server/dix/events.c21
-rw-r--r--xorg-server/dix/getevents.c8
-rw-r--r--xorg-server/dix/ptrveloc.c2
-rw-r--r--xorg-server/dix/touch.c38
-rw-r--r--xorg-server/hw/xfree86/common/xf86DGA.c10
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c10
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Option.c2
-rw-r--r--xorg-server/hw/xwin/winSetAppUserModelID.c1
-rw-r--r--xorg-server/hw/xwin/winblock.c32
-rw-r--r--xorg-server/hw/xwin/winconfig.c2
-rw-r--r--xorg-server/hw/xwin/winglobals.h4
-rw-r--r--xorg-server/hw/xwin/winkeybd.c8
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c115
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c61
-rw-r--r--xorg-server/hw/xwin/wintrayicon.c2
-rw-r--r--xorg-server/hw/xwin/winwakeup.c4
-rw-r--r--xorg-server/hw/xwin/winwindow.h1
-rw-r--r--xorg-server/include/input.h4
-rw-r--r--xorg-server/include/inputstr.h22
-rw-r--r--xorg-server/include/xwin-config.h.in3
-rw-r--r--xorg-server/mi/mieq.c6
-rw-r--r--xorg-server/render/animcur.c3
-rw-r--r--xorg-server/test/xi2/protocol-xiwarppointer.c2
-rw-r--r--xorg-server/xkb/xkbUtils.c10
-rw-r--r--xorg-server/xkeyboard-config/rules/base.extras.xml.in4
-rw-r--r--xorg-server/xkeyboard-config/symbols/ad31
-rw-r--r--xorg-server/xkeyboard-config/symbols/am2
30 files changed, 254 insertions, 196 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 58fe49363..74f3610cc 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1187,7 +1187,6 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
TouchOwnershipEvent *ev)
{
Bool was_owner = (resource == ti->listeners[0].listener);
- void *grab;
int i;
/* Send a TouchEnd event to the resource being removed, but only if they
@@ -1202,11 +1201,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
/* Remove the resource from the listener list, updating
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
- if (TouchRemoveListener(ti, resource)) {
- if (dixLookupResourceByType(&grab, resource, RT_PASSIVEGRAB,
- serverClient, DixGetAttrAccess) == Success)
- ti->num_grabs--;
- }
+ TouchRemoveListener(ti, resource);
/* If the current owner was removed and there are further listeners, deliver
* the TouchOwnership or TouchBegin event to the new owner. */
@@ -1300,34 +1295,19 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (listener->type == LISTENER_GRAB ||
listener->type == LISTENER_POINTER_GRAB) {
- rc = dixLookupResourceByType((pointer *) grab, listener->listener,
- RT_PASSIVEGRAB,
- serverClient, DixSendAccess);
- if (rc != Success) {
- /* the grab doesn't exist but we have a grabbing listener - this
- * is an implicit/active grab */
- rc = dixLookupClient(client, listener->listener, serverClient,
- DixSendAccess);
- if (rc != Success)
- return FALSE;
-
- *grab = dev->deviceGrab.grab;
- if (!*grab)
- return FALSE;
- }
+
+ *grab = listener->grab;
+
+ BUG_RETURN_VAL(!*grab, FALSE);
*client = rClient(*grab);
*win = (*grab)->window;
*mask = (*grab)->xi2mask;
}
else {
- if (listener->level == CORE)
- rc = dixLookupWindow(win, listener->listener,
- serverClient, DixSendAccess);
- else
- rc = dixLookupResourceByType((pointer *) win, listener->listener,
- RT_INPUTCLIENT,
- serverClient, DixSendAccess);
+ rc = dixLookupResourceByType((pointer *) win, listener->listener,
+ listener->resource_type,
+ serverClient, DixSendAccess);
if (rc != Success)
return FALSE;
@@ -1467,6 +1447,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
*/
l = &ti->listeners[ti->num_listeners - 1];
l->listener = devgrab->resource;
+ l->grab = devgrab;
+ //l->resource_type = RT_NONE;
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
l->type = LISTENER_POINTER_GRAB;
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c
index 454838f4c..de8924143 100644
--- a/xorg-server/config/udev.c
+++ b/xorg-server/config/udev.c
@@ -267,7 +267,7 @@ device_removed(struct udev_device *device)
if (strncmp(sysname,"card", 4) != 0)
return;
- ErrorF("removing GPU device %s %d\n", syspath, path);
+ ErrorF("removing GPU device %s %s\n", syspath, path);
if (!path)
return;
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 73593626e..f72cdc7c4 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1438,6 +1438,7 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
ti->listeners[0].type = LISTENER_POINTER_GRAB;
else
ti->listeners[0].type = LISTENER_GRAB;
+ ti->listeners[0].grab = grab;
}
}
}
@@ -1521,7 +1522,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
emulate a ButtonRelease here. So pretend the listener
already has the end event */
if (grab->grabtype == CORE || grab->grabtype == XI ||
- !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))
+ !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin))
ti->listeners[0].state = LISTENER_HAS_END;
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
}
@@ -1550,15 +1551,6 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
ReattachToOldMaster(mouse);
ComputeFreezes();
-
- /* If an explicit grab was deactivated, we must remove it from the head of
- * all the touches' listener lists. */
- for (i = 0; mouse->touch && i < mouse->touch->num_touches; i++) {
- TouchPointInfoPtr ti = mouse->touch->touches + i;
-
- if (ti->active && TouchResourceIsOwner(ti, grab_resource))
- TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
- }
}
/**
@@ -2246,7 +2238,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
* @return TRUE if the event should be discarded, FALSE otherwise.
*/
static BOOL
-FilterRawEvents(const ClientPtr client, const GrabPtr grab)
+FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root)
{
XIClientPtr client_xi_version;
int cmp;
@@ -2262,7 +2254,10 @@ FilterRawEvents(const ClientPtr client, const GrabPtr grab)
client_xi_version->minor_version, 2, 0);
/* XI 2.0: if device is grabbed, skip
XI 2.1: if device is grabbed by us, skip, we've already delivered */
- return (cmp == 0) ? TRUE : SameClient(grab, client);
+ if (cmp == 0)
+ return TRUE;
+
+ return (grab->window != root) ? FALSE : SameClient(grab, client);
}
/**
@@ -2315,7 +2310,7 @@ DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
*/
ic.next = NULL;
- if (!FilterRawEvents(rClient(&ic), grab))
+ if (!FilterRawEvents(rClient(&ic), grab, root))
DeliverEventToInputClients(device, &ic, root, xi, 1,
filter, NULL, &c, &m);
}
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 3d41e1e5a..a1e193815 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -1895,16 +1895,16 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (!mask_in ||
!valuator_mask_isset(mask_in, 0) ||
!valuator_mask_isset(mask_in, 1)) {
- ErrorF("%s: Attempted to start touch without x/y (driver bug)\n",
- dev->name);
+ ErrorFSigSafe("%s: Attempted to start touch without x/y "
+ "(driver bug)\n", dev->name);
return 0;
}
break;
case XI_TouchUpdate:
event->type = ET_TouchUpdate;
if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) {
- ErrorF("%s: TouchUpdate with no valuators? Driver bug\n",
- dev->name);
+ ErrorFSigSafe("%s: TouchUpdate with no valuators? Driver bug\n",
+ dev->name);
}
break;
case XI_TouchEnd:
diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c
index 338f415c5..c7994b03d 100644
--- a/xorg-server/dix/ptrveloc.c
+++ b/xorg-server/dix/ptrveloc.c
@@ -738,7 +738,7 @@ ApplyConstantDeceleration(DeviceVelocityPtr vel, double *fdx, double *fdy)
}
/*
- * compute the acceleration for given velocity and enforce min_acceleartion
+ * compute the acceleration for given velocity and enforce min_acceleration
*/
double
BasicComputeAcceleration(DeviceIntPtr dev,
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index d890b6227..0db842c65 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -675,15 +675,20 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
* Add the resource to this touch's listeners.
*/
void
-TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
- enum TouchListenerType type, enum TouchListenerState state,
- WindowPtr window)
+TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
+ enum InputLevel level, enum TouchListenerType type,
+ enum TouchListenerState state, WindowPtr window,
+ GrabPtr grab)
{
ti->listeners[ti->num_listeners].listener = resource;
+ ti->listeners[ti->num_listeners].resource_type = resource_type;
ti->listeners[ti->num_listeners].level = level;
ti->listeners[ti->num_listeners].state = state;
ti->listeners[ti->num_listeners].type = type;
ti->listeners[ti->num_listeners].window = window;
+ ti->listeners[ti->num_listeners].grab = grab;
+ if (grab)
+ ti->num_grabs++;
ti->num_listeners++;
}
@@ -702,6 +707,11 @@ TouchRemoveListener(TouchPointInfoPtr ti, XID resource)
if (ti->listeners[i].listener == resource) {
int j;
+ if (ti->listeners[i].grab) {
+ ti->listeners[i].grab = NULL;
+ ti->num_grabs--;
+ }
+
for (j = i; j < ti->num_listeners - 1; j++)
ti->listeners[j] = ti->listeners[j + 1];
ti->num_listeners--;
@@ -732,9 +742,9 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
type = LISTENER_POINTER_GRAB;
}
- TouchAddListener(ti, grab->resource, grab->grabtype,
- type, LISTENER_AWAITING_BEGIN, grab->window);
- ti->num_grabs++;
+ /* grab listeners are always RT_NONE since we keep the grab pointer */
+ TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype,
+ type, LISTENER_AWAITING_BEGIN, grab->window, grab);
}
/**
@@ -789,8 +799,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
TouchEventHistoryAllocate(ti);
- TouchAddListener(ti, iclients->resource, XI2,
- type, LISTENER_AWAITING_BEGIN, win);
+ TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2,
+ type, LISTENER_AWAITING_BEGIN, win, NULL);
return TRUE;
}
}
@@ -804,9 +814,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
continue;
TouchEventHistoryAllocate(ti);
- TouchAddListener(ti, iclients->resource, XI,
+ TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI,
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
- win);
+ win, NULL);
return TRUE;
}
}
@@ -819,9 +829,9 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
/* window owner */
if (IsMaster(dev) && (win->eventMask & core_filter)) {
TouchEventHistoryAllocate(ti);
- TouchAddListener(ti, win->drawable.id, CORE,
+ TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE,
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
- win);
+ win, NULL);
return TRUE;
}
@@ -831,8 +841,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
continue;
TouchEventHistoryAllocate(ti);
- TouchAddListener(ti, oclients->resource, CORE,
- type, LISTENER_AWAITING_BEGIN, win);
+ TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE,
+ type, LISTENER_AWAITING_BEGIN, win, NULL);
return TRUE;
}
}
diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c
index c25a2747b..6a05ce536 100644
--- a/xorg-server/hw/xfree86/common/xf86DGA.c
+++ b/xorg-server/hw/xfree86/common/xf86DGA.c
@@ -1033,6 +1033,9 @@ DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd)
UpdateDeviceState(keybd, &ev);
+ if (!IsMaster(keybd))
+ return;
+
/*
* Deliver the DGA event
*/
@@ -1074,6 +1077,7 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
DeviceEvent ev = {
.header = ET_Internal,
.length = sizeof(ev),
+ .detail.key = event->detail,
.type = event->subtype,
.corestate = butc ? butc->state : 0
};
@@ -1083,6 +1087,9 @@ DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse)
UpdateDeviceState(mouse, &ev);
+ if (!IsMaster(mouse))
+ return;
+
/*
* Deliver the DGA event
*/
@@ -1190,9 +1197,6 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device)
if (!pScreenPriv)
return;
- if (!IsMaster(device))
- return;
-
switch (event->subtype) {
case KeyPress:
case KeyRelease:
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index d8d4fad9c..377e936f7 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -619,14 +619,16 @@ InputHandlerProc
xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
{
static IHPtr handler = NULL;
- IHPtr old_handler = handler;
+ InputHandlerProc old_proc = NULL;
- if (old_handler)
- xf86RemoveGeneralHandler(old_handler);
+ if (handler) {
+ old_proc = handler->ihproc;
+ xf86RemoveGeneralHandler(handler);
+ }
handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data);
- return (old_handler) ? old_handler->ihproc : NULL;
+ return old_proc;
}
static void
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h
index 1be7ba54d..e545c1498 100644
--- a/xorg-server/hw/xfree86/common/xf86Module.h
+++ b/xorg-server/hw/xfree86/common/xf86Module.h
@@ -81,7 +81,7 @@ typedef enum {
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(14, 1)
-#define ABI_XINPUT_VERSION SET_ABI_VERSION(18, 0)
+#define ABI_XINPUT_VERSION SET_ABI_VERSION(19, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(7, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c
index c2ec79a53..40c9d15f4 100644
--- a/xorg-server/hw/xfree86/common/xf86Option.c
+++ b/xorg-server/hw/xfree86/common/xf86Option.c
@@ -515,7 +515,7 @@ ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
if (*s == '\0') {
if (markUsed) {
xf86DrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n",
+ "Option \"%s\" requires a string value\n",
p->name);
}
p->found = FALSE;
diff --git a/xorg-server/hw/xwin/winSetAppUserModelID.c b/xorg-server/hw/xwin/winSetAppUserModelID.c
index ce9da5e7d..41615e19c 100644
--- a/xorg-server/hw/xwin/winSetAppUserModelID.c
+++ b/xorg-server/hw/xwin/winSetAppUserModelID.c
@@ -28,6 +28,7 @@
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xwindows.h>
+#include <pthread.h>
#include "winwindow.h"
#include "os.h"
#include "winmsg.h"
diff --git a/xorg-server/hw/xwin/winblock.c b/xorg-server/hw/xwin/winblock.c
index a4ae8669f..c3ef4becd 100644
--- a/xorg-server/hw/xwin/winblock.c
+++ b/xorg-server/hw/xwin/winblock.c
@@ -42,14 +42,26 @@ winBlockHandler(ScreenPtr pScreen,
#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
winScreenPriv(pScreen);
#endif
- MSG msg;
#ifndef HAS_DEVWINDOWS
struct timeval **tvp = pTimeout;
if (*tvp != NULL) {
+ if (GetQueueStatus(QS_ALLINPUT | QS_ALLPOSTMESSAGE) != 0) {
+ /* If there are still messages to process on the Windows message
+ queue, make sure select() just polls rather than blocking.
+ */
+ (*tvp)->tv_sec = 0;
+ (*tvp)->tv_usec = 0;
+ }
+ else {
+ /* Otherwise, lacking /dev/windows, we must wake up again in
+ a reasonable time to check the Windows message queue. without
+ noticeable delay.
+ */
(*tvp)->tv_sec = 0;
(*tvp)->tv_usec = 100;
+ }
}
#endif
@@ -68,24 +80,12 @@ winBlockHandler(ScreenPtr pScreen,
if (iReturn != 0) {
ErrorF("winBlockHandler - pthread_mutex_unlock () failed: %d\n",
iReturn);
- goto winBlockHandler_ProcessMessages;
}
-
- winDebug("winBlockHandler - pthread_mutex_unlock () returned\n");
- }
-
- winBlockHandler_ProcessMessages:
-#endif
-
- /* Process all messages on our queue */
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
- if ((g_hDlgDepthChange == 0
- || !IsDialogMessage(g_hDlgDepthChange, &msg))
- && (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg))
- && (g_hDlgAbout == 0 || !IsDialogMessage(g_hDlgAbout, &msg))) {
- DispatchMessage(&msg);
+ else {
+ winDebug("winBlockHandler - pthread_mutex_unlock () returned\n");
}
}
+#endif
/*
At least one X client has asked to suspend the screensaver, so
diff --git a/xorg-server/hw/xwin/winconfig.c b/xorg-server/hw/xwin/winconfig.c
index 313320f1a..9e38113a5 100644
--- a/xorg-server/hw/xwin/winconfig.c
+++ b/xorg-server/hw/xwin/winconfig.c
@@ -762,7 +762,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p)
case OPTV_STRING:
if (*s == '\0') {
winDrvMsg(scrnIndex, X_WARNING,
- "Option \"%s\" requires an string value\n", p->name);
+ "Option \"%s\" requires a string value\n", p->name);
p->found = FALSE;
}
else {
diff --git a/xorg-server/hw/xwin/winglobals.h b/xorg-server/hw/xwin/winglobals.h
index 2edf9571e..d2e2ba2b4 100644
--- a/xorg-server/hw/xwin/winglobals.h
+++ b/xorg-server/hw/xwin/winglobals.h
@@ -26,6 +26,10 @@
#ifndef WINGLOBALS_H
#define WINGLOBALS_H
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+
/*
* References to external symbols
*/
diff --git a/xorg-server/hw/xwin/winkeybd.c b/xorg-server/hw/xwin/winkeybd.c
index a70cdcd16..27c114c99 100644
--- a/xorg-server/hw/xwin/winkeybd.c
+++ b/xorg-server/hw/xwin/winkeybd.c
@@ -56,7 +56,7 @@ static void
static void
winKeybdCtrl(DeviceIntPtr pDevice, KeybdCtrl * pCtrl);
-/*
+/*
* Translate a Windows WM_[SYS]KEY(UP/DOWN) message
* into an ASCII scan code.
*
@@ -134,7 +134,7 @@ winKeybdCtrl(DeviceIntPtr pDevice, KeybdCtrl * pCtrl)
{
}
-/*
+/*
* See Porting Layer Definition - p. 18
* winKeybdProc is known as a DeviceProc.
*/
@@ -509,8 +509,8 @@ winCheckKeyPressed(WPARAM wParam, LPARAM lParam)
return FALSE;
}
-/* Only on shift release message is sent even if both are pressed.
- * Fix this here
+/* Only one shift release message is sent even if both are pressed.
+ * Fix this here
*/
void
winFixShiftKeys(int iScanCode)
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 773fc9767..4f6dec78b 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -186,7 +186,7 @@ static void
winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle);
void
- winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle);
+ winUpdateWindowPosition(HWND hWnd, HWND * zstyle);
/*
* Local globals
@@ -590,6 +590,45 @@ UpdateIcon(WMInfoPtr pWMInfo, Window iWindow)
winUpdateIcon(hWnd, pWMInfo->pDisplay, iWindow, hIconNew);
}
+/*
+ * Updates the style of a HWND according to its X style properties
+ */
+
+static void
+UpdateStyle(WMInfoPtr pWMInfo, Window iWindow)
+{
+ HWND hWnd;
+ HWND zstyle = HWND_NOTOPMOST;
+ UINT flags;
+
+ hWnd = getHwnd(pWMInfo, iWindow);
+ if (!hWnd)
+ return;
+
+ /* Determine the Window style, which determines borders and clipping region... */
+ winApplyHints(pWMInfo->pDisplay, iWindow, hWnd, &zstyle);
+ winUpdateWindowPosition(hWnd, &zstyle);
+
+ /* Apply the updated window style, without changing it's show or activation state */
+ flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE;
+ if (zstyle == HWND_NOTOPMOST)
+ flags |= SWP_NOZORDER | SWP_NOOWNERZORDER;
+ SetWindowPos(hWnd, NULL, 0, 0, 0, 0, flags);
+
+ /*
+ Use the WS_EX_TOOLWINDOW style to remove window from Alt-Tab window switcher
+
+ According to MSDN, this is supposed to remove the window from the taskbar as well,
+ if we SW_HIDE before changing the style followed by SW_SHOW afterwards.
+
+ But that doesn't seem to work reliably, and causes the window to flicker, so use
+ the iTaskbarList interface to tell the taskbar to show or hide this window.
+ */
+ winShowWindowOnTaskbar(hWnd,
+ (GetWindowLongPtr(hWnd, GWL_EXSTYLE) &
+ WS_EX_APPWINDOW) ? TRUE : FALSE);
+}
+
#if 0
/*
* Fix up any differences between the X11 and Win32 window stacks
@@ -737,13 +776,19 @@ winMultiWindowWMProc(void *pArg)
(unsigned char *) &(pNode->msg.hwndWindow), 1);
UpdateName(pWMInfo, pNode->msg.iWindow);
UpdateIcon(pWMInfo, pNode->msg.iWindow);
- {
- HWND zstyle = HWND_NOTOPMOST;
+ UpdateStyle(pWMInfo, pNode->msg.iWindow);
+
- winApplyHints(pWMInfo->pDisplay, pNode->msg.iWindow,
- pNode->msg.hwndWindow, &zstyle);
- winUpdateWindowPosition(pNode->msg.hwndWindow, TRUE, &zstyle);
+ /* Reshape */
+ {
+ WindowPtr pWin =
+ GetProp(pNode->msg.hwndWindow, WIN_WINDOW_PROP);
+ if (pWin) {
+ winReshapeMultiWindow(pWin);
+ winUpdateRgnMultiWindow(pWin);
+ }
}
+
break;
case WM_WM_UNMAP:
@@ -802,6 +847,19 @@ winMultiWindowWMProc(void *pArg)
UpdateIcon(pWMInfo, pNode->msg.iWindow);
break;
+ case WM_WM_HINTS_EVENT:
+ {
+ XWindowAttributes attr;
+
+ /* Don't do anything if this is an override-redirect window */
+ XGetWindowAttributes (pWMInfo->pDisplay, pNode->msg.iWindow, &attr);
+ if (attr.override_redirect)
+ break;
+
+ UpdateStyle(pWMInfo, pNode->msg.iWindow);
+ }
+ break;
+
case WM_WM_CHANGE_STATE:
/* Minimize the window in Windows */
winMinimizeWindow(pNode->msg.iWindow);
@@ -851,6 +909,7 @@ winMultiWindowXMsgProc(void *pArg)
Atom atmWmHints;
Atom atmWmChange;
Atom atmNetWmIcon;
+ Atom atmWindowState, atmMotifWmHints, atmWindowType, atmNormalHints;
int iReturn;
XIconSize *xis;
@@ -977,6 +1036,10 @@ winMultiWindowXMsgProc(void *pArg)
atmWmHints = XInternAtom(pProcArg->pDisplay, "WM_HINTS", False);
atmWmChange = XInternAtom(pProcArg->pDisplay, "WM_CHANGE_STATE", False);
atmNetWmIcon = XInternAtom(pProcArg->pDisplay, "_NET_WM_ICON", False);
+ atmWindowState = XInternAtom(pProcArg->pDisplay, "_NET_WM_STATE", False);
+ atmMotifWmHints = XInternAtom(pProcArg->pDisplay, "_MOTIF_WM_HINTS", False);
+ atmWindowType = XInternAtom(pProcArg->pDisplay, "_NET_WM_WINDOW_TYPE", False);
+ atmNormalHints = XInternAtom(pProcArg->pDisplay, "WM_NORMAL_HINTS", False);
/*
iiimxcf had a bug until 2009-04-27, assuming that the
@@ -1114,14 +1177,34 @@ winMultiWindowXMsgProc(void *pArg)
/* Other fields ignored */
winSendMessageToWM(pProcArg->pWMInfo, &msg);
}
- else if ((event.xproperty.atom == atmWmHints) ||
- (event.xproperty.atom == atmNetWmIcon)) {
- memset(&msg, 0, sizeof(msg));
- msg.msg = WM_WM_ICON_EVENT;
- msg.iWindow = event.xproperty.window;
+ else {
+ /*
+ Several properties are considered for WM hints, check if this property change affects any of them...
+ (this list needs to be kept in sync with winApplyHints())
+ */
+ if ((event.xproperty.atom == atmWmHints) ||
+ (event.xproperty.atom == atmWindowState) ||
+ (event.xproperty.atom == atmMotifWmHints) ||
+ (event.xproperty.atom == atmWindowType) ||
+ (event.xproperty.atom == atmNormalHints)) {
+ memset(&msg, 0, sizeof(msg));
+ msg.msg = WM_WM_HINTS_EVENT;
+ msg.iWindow = event.xproperty.window;
+
+ /* Other fields ignored */
+ winSendMessageToWM(pProcArg->pWMInfo, &msg);
+ }
- /* Other fields ignored */
- winSendMessageToWM(pProcArg->pWMInfo, &msg);
+ /* Not an else as WM_HINTS affects both style and icon */
+ if ((event.xproperty.atom == atmWmHints) ||
+ (event.xproperty.atom == atmNetWmIcon)) {
+ memset(&msg, 0, sizeof(msg));
+ msg.msg = WM_WM_ICON_EVENT;
+ msg.iWindow = event.xproperty.window;
+
+ /* Other fields ignored */
+ winSendMessageToWM(pProcArg->pWMInfo, &msg);
+ }
}
}
else if (event.type == ClientMessage
@@ -1749,7 +1832,7 @@ winApplyHints(Display * pDisplay, Window iWindow, HWND hWnd, HWND * zstyle)
}
void
-winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
+winUpdateWindowPosition(HWND hWnd, HWND * zstyle)
{
int iX, iY, iWidth, iHeight;
int iDx, iDy;
@@ -1800,8 +1883,4 @@ winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle)
SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top,
rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, 0);
- if (reshape) {
- winReshapeMultiWindow(pWin);
- winUpdateRgnMultiWindow(pWin);
- }
}
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index c2292c661..0e46ea7fe 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -42,7 +42,7 @@
#include "winmsg.h"
#include "inputstr.h"
-extern void winUpdateWindowPosition(HWND hWnd, Bool reshape, HWND * zstyle);
+extern void winUpdateWindowPosition(HWND hWnd, HWND * zstyle);
/*
* Local globals
@@ -870,41 +870,36 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* */
if (!pWin->overrideRedirect) {
+ HWND zstyle = HWND_NOTOPMOST;
+
/* Flag that this window needs to be made active when clicked */
SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1);
- if (!(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)) {
- HWND zstyle = HWND_NOTOPMOST;
-
- /* Set the window extended style flags */
- SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
-
- /* Set the transient style flags */
- if (GetParent(hwnd))
- SetWindowLongPtr(hwnd, GWL_STYLE,
- WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
- WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
- /* Set the window standard style flags */
- else
- SetWindowLongPtr(hwnd, GWL_STYLE,
- (WS_POPUP | WS_OVERLAPPEDWINDOW |
- WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
- & ~WS_CAPTION & ~WS_SIZEBOX);
-
- winUpdateWindowPosition(hwnd, FALSE, &zstyle);
-
- {
- WinXWMHints hints;
-
- if (winMultiWindowGetWMHints(pWin, &hints)) {
- /*
- Give the window focus, unless it has an InputHint
- which is FALSE (this is used by e.g. glean to
- avoid every test window grabbing the focus)
- */
- if (!((hints.flags & InputHint) && (!hints.input))) {
- SetForegroundWindow(hwnd);
- }
+ /* Set the transient style flags */
+ if (GetParent(hwnd))
+ SetWindowLongPtr(hwnd, GWL_STYLE,
+ WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
+ WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ /* Set the window standard style flags */
+ else
+ SetWindowLongPtr(hwnd, GWL_STYLE,
+ (WS_POPUP | WS_OVERLAPPEDWINDOW |
+ WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
+ & ~WS_CAPTION & ~WS_SIZEBOX);
+
+ winUpdateWindowPosition(hwnd, &zstyle);
+
+ {
+ WinXWMHints hints;
+
+ if (winMultiWindowGetWMHints(pWin, &hints)) {
+ /*
+ Give the window focus, unless it has an InputHint
+ which is FALSE (this is used by e.g. glean to
+ avoid every test window grabbing the focus)
+ */
+ if (!((hints.flags & InputHint) && (!hints.input))) {
+ SetForegroundWindow(hwnd);
}
}
}
diff --git a/xorg-server/hw/xwin/wintrayicon.c b/xorg-server/hw/xwin/wintrayicon.c
index dbc47257b..f168b884a 100644
--- a/xorg-server/hw/xwin/wintrayicon.c
+++ b/xorg-server/hw/xwin/wintrayicon.c
@@ -114,7 +114,7 @@ winHandleIconMessage(HWND hwnd, UINT message,
switch (lParam) {
case WM_LBUTTONUP:
/* Restack and bring all windows to top */
- SetForegroundWindow(hwnd);
+ SetForegroundWindow (pScreenPriv->hwndScreen);
#ifdef XWIN_MULTIWINDOWEXTWM
if (pScreenInfo->fMWExtWM)
diff --git a/xorg-server/hw/xwin/winwakeup.c b/xorg-server/hw/xwin/winwakeup.c
index 77c160533..795221a1a 100644
--- a/xorg-server/hw/xwin/winwakeup.c
+++ b/xorg-server/hw/xwin/winwakeup.c
@@ -43,8 +43,8 @@ winWakeupHandler(ScreenPtr pScreen,
{
MSG msg;
- /* Process all messages on our queue */
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ /* Process one message from our queue */
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if ((g_hDlgDepthChange == 0
|| !IsDialogMessage(g_hDlgDepthChange, &msg))
&& (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg))
diff --git a/xorg-server/hw/xwin/winwindow.h b/xorg-server/hw/xwin/winwindow.h
index 37b975224..25826ecc7 100644
--- a/xorg-server/hw/xwin/winwindow.h
+++ b/xorg-server/hw/xwin/winwindow.h
@@ -110,6 +110,7 @@ typedef struct _winWMMessageRec {
#define WM_WM_CHANGE_STATE (WM_USER + 11)
#define WM_WM_MAP2 (WM_USER + 12)
#define WM_WM_MAP3 (WM_USER + 13)
+#define WM_WM_HINTS_EVENT (WM_USER + 14)
#define WM_MANAGE (WM_USER + 100)
#define WM_UNMANAGE (WM_USER + 102)
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 23a20b59d..f53ed9905 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -565,9 +565,9 @@ extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev,
XID resource);
extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
-extern void TouchAddListener(TouchPointInfoPtr ti, XID resource,
+extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
enum InputLevel level, enum TouchListenerType type,
- enum TouchListenerState state, WindowPtr window);
+ enum TouchListenerState state, WindowPtr window, GrabPtr grab);
extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti,
InternalEvent *ev);
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 17cee9854..48a29bede 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -298,6 +298,17 @@ typedef struct _ValuatorClassRec {
int v_scroll_axis; /* vert smooth-scrolling axis */
} ValuatorClassRec;
+typedef struct _TouchListener {
+ XID listener; /* grabs/event selection IDs receiving
+ * events for this touch */
+ int resource_type; /* listener's resource type */
+ enum TouchListenerType type;
+ enum TouchListenerState state;
+ enum InputLevel level; /* matters only for emulating touches */
+ WindowPtr window;
+ GrabPtr grab;
+} TouchListener;
+
typedef struct _TouchPointInfo {
uint32_t client_id; /* touch ID as seen in client events */
int sourceid; /* Source device's ID for this touchpoint */
@@ -306,14 +317,7 @@ typedef struct _TouchPointInfo {
* but still owned by a grab */
SpriteRec sprite; /* window trace for delivery */
ValuatorMask *valuators; /* last recorded axis values */
- struct _TouchListener {
- XID listener; /* grabs/event selection IDs receiving
- * events for this touch */
- enum TouchListenerType type;
- enum TouchListenerState state;
- enum InputLevel level; /* matters only for emulating touches */
- WindowPtr window;
- } *listeners;
+ TouchListener *listeners; /* set of listeners */
int num_listeners;
int num_grabs; /* number of open grabs on this touch
* which have not accepted or rejected */
@@ -323,8 +327,6 @@ typedef struct _TouchPointInfo {
size_t history_size; /* Size of history in elements */
} TouchPointInfoRec;
-typedef struct _TouchListener TouchListener;
-
typedef struct _DDXTouchPointInfo {
uint32_t client_id; /* touch ID as seen in client events */
Bool active; /* whether or not the touch is active */
diff --git a/xorg-server/include/xwin-config.h.in b/xorg-server/include/xwin-config.h.in
index 8122f5543..c5119f268 100644
--- a/xorg-server/include/xwin-config.h.in
+++ b/xorg-server/include/xwin-config.h.in
@@ -31,3 +31,6 @@
/* Default log location */
#undef DEFAULT_LOGDIR
+
+/* Whether we should re-locate the root to where the executable lives */
+#undef RELOCATE_PROJECTROOT
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index 22f8c91bb..d7d73deb6 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -627,7 +627,11 @@ mieqProcessInputEvents(void)
mieqProcessDeviceEvent(dev, &event, screen);
/* Update the sprite now. Next event may be from different device. */
- if (event.any.type == ET_Motion && master)
+ if (master &&
+ (event.any.type == ET_Motion ||
+ ((event.any.type == ET_TouchBegin ||
+ event.any.type == ET_TouchUpdate) &&
+ event.device_event.flags & TOUCH_POINTER_EMULATED)))
miPointerUpdateSprite(dev);
#ifdef XQUARTZ
diff --git a/xorg-server/render/animcur.c b/xorg-server/render/animcur.c
index ebc5b8ef7..9cbba83fa 100644
--- a/xorg-server/render/animcur.c
+++ b/xorg-server/render/animcur.c
@@ -143,6 +143,8 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
Bool activeDevice = FALSE;
CARD32 now = 0, soonest = ~0; /* earliest time to wakeup again */
+ Unwrap(as, pScreen, BlockHandler);
+
for (dev = inputInfo.devices; dev; dev = dev->next) {
if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) {
if (!activeDevice) {
@@ -180,7 +182,6 @@ AnimCurScreenBlockHandler(ScreenPtr pScreen,
if (activeDevice)
AdjustWaitForDelay(pTimeout, soonest - now);
- Unwrap(as, pScreen, BlockHandler);
(*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
if (activeDevice)
Wrap(as, pScreen, BlockHandler, AnimCurScreenBlockHandler);
diff --git a/xorg-server/test/xi2/protocol-xiwarppointer.c b/xorg-server/test/xi2/protocol-xiwarppointer.c
index 4bea333c3..f7986c1eb 100644
--- a/xorg-server/test/xi2/protocol-xiwarppointer.c
+++ b/xorg-server/test/xi2/protocol-xiwarppointer.c
@@ -68,7 +68,7 @@ __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access)
* This function overrides the one in the screen rec.
*/
static Bool
-ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr screen,
+ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr scr,
int x, int y, Bool generateEvent)
{
assert(x == expected_x);
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c
index c23cd7784..6c6af60f0 100644
--- a/xorg-server/xkb/xkbUtils.c
+++ b/xorg-server/xkb/xkbUtils.c
@@ -642,6 +642,7 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
CARD16 grp_mask;
XkbStatePtr state = &xkbi->state;
XkbCompatMapPtr map;
+ XkbControlsPtr ctrls;
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
return;
@@ -650,9 +651,14 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
grp_mask = map->groups[state->group].mask;
state->compat_state = state->mods | grp_mask;
state->compat_lookup_mods = state->lookup_mods | grp_mask;
+ ctrls= xkbi->desc->ctrls;
- if (xkbi->desc->ctrls->enabled_ctrls & XkbIgnoreGroupLockMask)
- grp_mask = map->groups[state->base_group].mask;
+ if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) {
+ unsigned char grp = state->base_group+state->latched_group;
+ if (grp >= ctrls->num_groups)
+ grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls);
+ grp_mask = map->groups[grp].mask;
+ }
state->compat_grab_mods = state->grab_mods | grp_mask;
return;
}
diff --git a/xorg-server/xkeyboard-config/rules/base.extras.xml.in b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
index 1614eec96..cec043f67 100644
--- a/xorg-server/xkeyboard-config/rules/base.extras.xml.in
+++ b/xorg-server/xkeyboard-config/rules/base.extras.xml.in
@@ -462,7 +462,7 @@
<variant>
<configItem>
<name>sun_type6</name>
- <_description>Portuguese (Brazil,Sun Type 6/7)</_description>
+ <_description>Portuguese (Brazil, Sun Type 6/7)</_description>
</configItem>
</variant>
</variantList>
@@ -693,7 +693,7 @@
<configItem>
<name>ch</name>
<_shortDescription>de</_shortDescription>
- <_description>>German (Switzerland)</_description>
+ <_description>German (Switzerland)</_description>
</configItem>
<variantList>
<variant>
diff --git a/xorg-server/xkeyboard-config/symbols/ad b/xorg-server/xkeyboard-config/symbols/ad
deleted file mode 100644
index 0b1520175..000000000
--- a/xorg-server/xkeyboard-config/symbols/ad
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// Catalan Keyboard, as manufactured by Large Format Computing, Inc.
-//
-// For layout graphic, see http://www.language-keyboard.com/languages/catalan_layout.htm
-//
-// Contributed by Robert Millan
-
-partial default alphanumeric_keys
-xkb_symbols "basic" {
- include "us"
-
- name[Group1]="Catalan";
-
- key <AE02> { [ 2, at, dead_diaeresis ] };
- key <AE07> { [ 7, ampersand, dead_acute ] };
- key <AE09> { [ 9, parenleft, dead_grave ] };
- key <AD02> { [ w, W, eacute, Eacute ] };
- key <AD03> { [ e, E, egrave, Egrave ] };
- key <AD06> { [ y, Y, udiaeresis, Udiaeresis ] };
- key <AD07> { [ u, U, uacute, Uacute ] };
- key <AD08> { [ i, I, iacute, Iacute ] };
- key <AD09> { [ o, O, oacute, Oacute ] };
- key <AD10> { [ p, P, ograve, Ograve ] };
- key <AD12> { [ bracketright, braceright, EuroSign ] };
- key <AC01> { [ a, A, agrave, Agrave ] };
- key <AC08> { [ k, K, idiaeresis, Idiaeresis ] };
- key <AC09> { [ l, L, periodcentered ] };
- key <AB03> { [ c, C, ccedilla, Ccedilla ] };
-
- include "level3(ralt_switch)"
-};
diff --git a/xorg-server/xkeyboard-config/symbols/am b/xorg-server/xkeyboard-config/symbols/am
index 5e6954e0b..abe6e1270 100644
--- a/xorg-server/xkeyboard-config/symbols/am
+++ b/xorg-server/xkeyboard-config/symbols/am
@@ -12,7 +12,7 @@ xkb_symbols "basic" {
key <AE01> { [ 0x1000586, 0x1000556 ] };
key <AE02> { [ 0x1000571, 0x1000541 ] };
- key <AE03> { [ 0x1002013, 0x1002014 ] };
+ key <AE03> { [ 0x100058a, 0x1002014 ] };
key <AE04> { [ comma, dollar ] };
key <AE05> { [ 0x1000589, 0x1002026 ] };
key <AE06> { [ 0x100055e, percent ] };