From 57818d0fe4f7cf94279909f03ec11b326b284f1e Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 26 Nov 2010 15:22:07 +0000 Subject: libXext xserver libfontenc libX11 libxcb pixman git update 26 11 2010 --- xorg-server/config/Makefile.am | 2 + xorg-server/dix/eventconvert.c | 14 +-- xorg-server/dix/getevents.c | 41 +++++--- xorg-server/doc/xml/Makefile.am | 11 +- xorg-server/doc/xml/dtrace/Makefile.am | 14 ++- xorg-server/doc/xml/xmlrules-inst.in | 23 +++++ xorg-server/doc/xml/xmlrules-noinst.in | 22 ++++ xorg-server/doc/xml/xmlrules.in | 53 ++-------- xorg-server/hw/dmx/doc/Makefile.am | 8 +- xorg-server/hw/xfree86/common/xf86Xinput.c | 2 +- xorg-server/hw/xfree86/doc/man/Xorg.man.pre | 4 +- xorg-server/hw/xfree86/doc/sgml/Makefile.am | 10 +- xorg-server/hw/xfree86/modes/xf86RandR12.c | 10 ++ xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 6 +- xorg-server/hw/xquartz/X11Application.m | 46 +++++++++ .../Resources/Spanish.lproj/locversion.plist | 4 +- .../Spanish.lproj/main.nib/designable.nib | 52 +++++----- .../Spanish.lproj/main.nib/keyedobjects.nib | Bin 55270 -> 55363 bytes .../bundle/Resources/ar.lproj/locversion.plist | 4 +- .../Resources/ar.lproj/main.nib/designable.nib | 44 +++----- .../Resources/ar.lproj/main.nib/keyedobjects.nib | Bin 53979 -> 52500 bytes .../bundle/Resources/da.lproj/locversion.plist | 4 +- .../Resources/da.lproj/main.nib/designable.nib | 21 ++-- .../Resources/da.lproj/main.nib/keyedobjects.nib | Bin 53146 -> 51733 bytes .../bundle/Resources/pl.lproj/locversion.plist | 4 +- .../Resources/pl.lproj/main.nib/designable.nib | 23 +++-- .../Resources/pl.lproj/main.nib/keyedobjects.nib | Bin 54034 -> 52636 bytes .../bundle/Resources/pt.lproj/locversion.plist | 4 +- .../Resources/pt.lproj/main.nib/designable.nib | 97 ++++++++++++------ .../Resources/pt.lproj/main.nib/keyedobjects.nib | Bin 54537 -> 54868 bytes .../bundle/Resources/sv.lproj/locversion.plist | 4 +- .../Resources/sv.lproj/main.nib/designable.nib | 42 ++++---- .../Resources/sv.lproj/main.nib/keyedobjects.nib | Bin 54129 -> 52740 bytes .../Resources/zh_CN.lproj/main.nib/designable.nib | 2 +- .../zh_CN.lproj/main.nib/keyedobjects.nib | Bin 43969 -> 43969 bytes xorg-server/hw/xquartz/bundle/mk_bundke.sh | 61 +++++------ xorg-server/hw/xquartz/darwinXinput.c | 19 ---- xorg-server/hw/xquartz/xpr/dri.c | 112 --------------------- xorg-server/include/inputstr.h | 2 +- xorg-server/test/input.c | 90 +++++++++++++---- 40 files changed, 441 insertions(+), 414 deletions(-) create mode 100644 xorg-server/doc/xml/xmlrules-inst.in create mode 100644 xorg-server/doc/xml/xmlrules-noinst.in (limited to 'xorg-server') diff --git a/xorg-server/config/Makefile.am b/xorg-server/config/Makefile.am index d8a7b45f6..72d22346b 100644 --- a/xorg-server/config/Makefile.am +++ b/xorg-server/config/Makefile.am @@ -9,8 +9,10 @@ AM_CFLAGS += $(UDEV_CFLAGS) libconfig_la_SOURCES += udev.c libconfig_la_LIBADD = $(UDEV_LIBS) +if XORG xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) xorgconfd_DATA = 10-evdev.conf +endif else diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index e45878a90..e9297149c 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -324,14 +324,16 @@ countValuators(DeviceEvent *ev, int *first) for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { - /* Assume mode of 0th valuator matches XI1 device mode. Stop when the - * event mode changes since XI1 can't handle mixed mode devices. - */ - if (ev->valuators.mode[i] != ev->valuators.mode[0]) - break; - if (BitIsOn(ev->valuators.mask, i)) { + /* Assume mode of first_valuator matches XI1 device mode. Stop when the + * event mode changes since XI1 can't handle mixed mode devices. + */ + if (first_valuator > -1 && + BitIsOn(ev->valuators.mode, i) != + BitIsOn(ev->valuators.mode, first_valuator)) + break; + if (first_valuator == -1) first_valuator = i; last_valuator = i; diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index d5d6a78b1..9fb6b689f 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -115,9 +115,9 @@ button_is_down(DeviceIntPtr pDev, int button, int type) int ret = 0; if (type & BUTTON_PROCESSED) - ret |= !!BitIsOn(pDev->button->down, button); + ret |= BitIsOn(pDev->button->down, button); if (type & BUTTON_POSTED) - ret |= !!BitIsOn(pDev->button->postdown, button); + ret |= BitIsOn(pDev->button->postdown, button); return ret; } @@ -146,9 +146,9 @@ key_is_down(DeviceIntPtr pDev, int key_code, int type) int ret = 0; if (type & KEY_PROCESSED) - ret |= !!BitIsOn(pDev->key->down, key_code); + ret |= BitIsOn(pDev->key->down, key_code); if (type & KEY_POSTED) - ret |= !!BitIsOn(pDev->key->postdown, key_code); + ret |= BitIsOn(pDev->key->postdown, key_code); return ret; } @@ -210,7 +210,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask) if (valuator_mask_isset(mask, i)) { SetBit(event->valuators.mask, i); - if (dev->valuator->axes[i].mode == Absolute) + if (valuator_get_mode(dev, i) == Absolute) SetBit(event->valuators.mode, i); event->valuators.data[i] = valuator_mask_get(mask, i); event->valuators.data_frac[i] = @@ -1057,14 +1057,18 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask) struct pixman_f_vector p; /* p' = M * p in homogeneous coordinates */ - p.v[0] = valuator_mask_get(mask, 0); - p.v[1] = valuator_mask_get(mask, 1); + p.v[0] = (valuator_mask_isset(mask, 0) ? valuator_mask_get(mask, 0) : + dev->last.valuators[0]); + p.v[1] = (valuator_mask_isset(mask, 1) ? valuator_mask_get(mask, 1) : + dev->last.valuators[1]); p.v[2] = 1.0; pixman_f_transform_point(&dev->transform, &p); - valuator_mask_set(mask, 0, lround(p.v[0])); - valuator_mask_set(mask, 1, lround(p.v[1])); + if (lround(p.v[0]) != dev->last.valuators[0]) + valuator_mask_set(mask, 0, lround(p.v[0])); + if (lround(p.v[1]) != dev->last.valuators[1]) + valuator_mask_set(mask, 1, lround(p.v[1])); } /** @@ -1139,7 +1143,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, } if (valuator_mask_isset(&mask, 1)) { - scaled = rescaleValuatorAxis(valuator_mask_get(&mask, 0), + scaled = rescaleValuatorAxis(valuator_mask_get(&mask, 1), 0.0, &y_frac, NULL, pDev->valuator->axes + 1, scr->height); @@ -1155,11 +1159,16 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, * should be converted to masked valuators. */ int vals[2]; vals[0] = valuator_mask_isset(&mask, 0) ? - valuator_mask_get(&mask, 0) : pDev->last.valuators[0]; + valuator_mask_get(&mask, 0) : 0; vals[1] = valuator_mask_isset(&mask, 1) ? - valuator_mask_get(&mask, 1) : pDev->last.valuators[1]; + valuator_mask_get(&mask, 1) : 0; accelPointer(pDev, 0, 2, vals, ms); + if (valuator_mask_isset(&mask, 0)) + valuator_mask_set(&mask, 0, vals[0]); + if (valuator_mask_isset(&mask, 1)) + valuator_mask_set(&mask, 1, vals[1]); + /* The pointer acceleration code modifies the fractional part * in-place, so we need to extract this information first */ x_frac = pDev->last.remainder[0]; @@ -1177,7 +1186,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, if (valuator_mask_isset(&mask, 0)) valuator_mask_set(&mask, 0, x); if (valuator_mask_isset(&mask, 1)) - valuator_mask_set(&mask, 0, y); + valuator_mask_set(&mask, 1, y); clipValuators(pDev, &mask); @@ -1239,13 +1248,17 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, const Valuato valuator_mask_copy(&mask, mask_in); /* ignore relative axes for proximity. */ - for (i = 0; i < valuator_mask_num_valuators(&mask); i++) + for (i = 0; i < valuator_mask_size(&mask); i++) { if (valuator_mask_isset(&mask, i) && valuator_get_mode(pDev, i) == Relative) valuator_mask_unset(&mask, i); } + /* FIXME: posting proximity events with relative valuators only results + * in an empty event, EventToXI() will fail to convert → no event sent + * to client. */ + events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); event = (DeviceEvent *) events->event; diff --git a/xorg-server/doc/xml/Makefile.am b/xorg-server/doc/xml/Makefile.am index 2913eff55..9feb1f03d 100644 --- a/xorg-server/doc/xml/Makefile.am +++ b/xorg-server/doc/xml/Makefile.am @@ -22,14 +22,9 @@ # SUBDIRS = dtrace +doc_sources = Xserver-spec.xml -XML_FILES = Xserver-spec.xml - -include xmlrules.in - +# Developer's documentation is not installed if ENABLE_DEVEL_DOCS -noinst_DATA = $(BUILT_DOC_FILES) +include $(top_srcdir)/doc/xml/xmlrules-noinst.in endif -CLEANFILES = $(CLEAN_DOC_FILES) - -EXTRA_DIST = $(XML_FILES) diff --git a/xorg-server/doc/xml/dtrace/Makefile.am b/xorg-server/doc/xml/dtrace/Makefile.am index dc6127416..8bbe040d8 100644 --- a/xorg-server/doc/xml/dtrace/Makefile.am +++ b/xorg-server/doc/xml/dtrace/Makefile.am @@ -21,18 +21,16 @@ # DEALINGS IN THE SOFTWARE. # -XML_FILES = Xserver-DTrace.xml - -include ../xmlrules.in +doc_sources = Xserver-DTrace.xml if ENABLE_DOCS + +# This user's documentation is installed only if tracing is available if XSERVER_DTRACE -doc_DATA = $(BUILT_DOC_FILES) +include $(top_srcdir)/doc/xml/xmlrules-inst.in else -noinst_DATA = $(BUILT_DOC_FILES) -endif +include $(top_srcdir)/doc/xml/xmlrules-noinst.in endif -CLEANFILES = $(CLEAN_DOC_FILES) +endif -EXTRA_DIST = $(XML_FILES) diff --git a/xorg-server/doc/xml/xmlrules-inst.in b/xorg-server/doc/xml/xmlrules-inst.in new file mode 100644 index 000000000..d6965ff05 --- /dev/null +++ b/xorg-server/doc/xml/xmlrules-inst.in @@ -0,0 +1,23 @@ + +# The doc_sources variable contains one or more DocBook/XML source file. +# The generated documents will be installed in $(docdir), +# The DocBook/XML files will always be included in the tarball + +dist_doc_DATA = $(doc_sources) + +if HAVE_XMLTO +doc_DATA = $(doc_sources:.xml=.html) + +if HAVE_FOP +doc_DATA += $(doc_sources:.xml=.pdf) +endif + +if HAVE_XMLTO_TEXT +doc_DATA += $(doc_sources:.xml=.txt) +endif + +CLEANFILES = $(doc_DATA) +include $(top_srcdir)/doc/xml/xmlrules.in + +endif HAVE_XMLTO + diff --git a/xorg-server/doc/xml/xmlrules-noinst.in b/xorg-server/doc/xml/xmlrules-noinst.in new file mode 100644 index 000000000..d582c2efd --- /dev/null +++ b/xorg-server/doc/xml/xmlrules-noinst.in @@ -0,0 +1,22 @@ + +# The doc_sources variable contains one or more DocBook/XML source file. +# The generated documents will NOT be installed in $(docdir), +# The DocBook/XML files will always be included in the tarball + +dist_noinst_DATA = $(doc_sources) + +if HAVE_XMLTO +noinst_DATA = $(doc_sources:.xml=.html) + +if HAVE_FOP +noinst_DATA += $(doc_sources:.xml=.pdf) +endif + +if HAVE_XMLTO_TEXT +noinst_DATA += $(doc_sources:.xml=.txt) +endif + +CLEANFILES = $(noinst_DATA) +include $(top_srcdir)/doc/xml/xmlrules.in + +endif HAVE_XMLTO diff --git a/xorg-server/doc/xml/xmlrules.in b/xorg-server/doc/xml/xmlrules.in index 1222bb5af..cc77ffc25 100644 --- a/xorg-server/doc/xml/xmlrules.in +++ b/xorg-server/doc/xml/xmlrules.in @@ -21,58 +21,27 @@ # DEALINGS IN THE SOFTWARE. # -# This file is included by Makefile.am in subdirectories that have -# DocBook XML documentation files. -# -# No files are automatically distributed or installed by this subset of rules -# Any files to be distributed or installed would be listed in the including -# Makefile.am - -TXT_FILES = $(XML_FILES:%.xml=%.txt) -HTML_FILES = $(XML_FILES:%.xml=%.html) -PDF_FILES = $(XML_FILES:%.xml=%.pdf) - -BUILT_DOC_FILES = +# This file provides pattern rules to generate html/pdf/txt from DocBook/XML +# A stylesheet is used if xorg-sgml-doctools is installed +# This file is included by xmlrules-inst.in for installable user's documentation +# It is included by xmlrules-noinst for non installable developer's documentation +# If the server version or release date changes, autogen && make +XML_ENT_DIR = $(abs_top_builddir)/doc/xml SUFFIXES = .xml .txt .html .pdf -XML_ENT_DIR = $(abs_top_builddir)/doc/xml XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) if HAVE_STYLESHEETS -XMLTO_FLAGS += -m $(XSL_STYLESHEET) -BUILT_DOC_FILES += xorg.css - -xorg.css: $(STYLESHEET_SRCDIR)/xorg.css - $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +XMLTO_FLAGS += -m $(XSL_STYLESHEET) \ + --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css endif -if HAVE_XMLTO -if HAVE_XMLTO_TEXT -BUILT_DOC_FILES += $(TXT_FILES) -.xml.txt: - @rm -f $@ +%.txt: %.xml $(XML_ENT_DIR)/xserver.ent $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< -endif -BUILT_DOC_FILES += $(HTML_FILES) -.xml.html: - @rm -f $@ +%.html: %.xml $(XML_ENT_DIR)/xserver.ent $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< -if HAVE_FOP -BUILT_DOC_FILES += $(PDF_FILES) -.xml.pdf: - @rm -f $@ +%.pdf: %.xml $(XML_ENT_DIR)/xserver.ent $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< -endif - -endif - -CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css - -# All the files we build depend on the entities -$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent - -$(XML_ENT_DIR)/xserver.ent: - (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F)) diff --git a/xorg-server/hw/dmx/doc/Makefile.am b/xorg-server/hw/dmx/doc/Makefile.am index 58cb27c17..5f845763e 100644 --- a/xorg-server/hw/dmx/doc/Makefile.am +++ b/xorg-server/hw/dmx/doc/Makefile.am @@ -19,14 +19,12 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -XML_FILES = dmx.xml scaled.xml - -include ../../../doc/xml/xmlrules.in +doc_sources = dmx.xml scaled.xml +# Developer's documentation is not installed if ENABLE_DEVEL_DOCS -noinst_DATA = $(BUILT_DOC_FILES) +include $(top_srcdir)/doc/xml/xmlrules-noinst.in endif -CLEANFILES = $(CLEAN_DOC_FILES) if HAVE_DOXYGEN diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index e90268a06..3a48fe9c3 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -1296,7 +1296,7 @@ xf86ScaleAxis(int Cx, } else { X = 0; - ErrorF ("Divide by Zero in xf86ScaleAxis"); + ErrorF ("Divide by Zero in xf86ScaleAxis\n"); } if (X > to_max) diff --git a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre index 297eda1fb..c497a0e8c 100644 --- a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre +++ b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre @@ -32,8 +32,8 @@ SPARC and PowerPC. The most widely supported operating systems are the free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD, OpenBSD, and Solaris. Commercial UNIX operating systems such as UnixWare are also supported. Other supported operating systems include -GNU Hurd. Darwin and Mac OS X are supported with the -XDarwin(__appmansuffix__) X server. Win32/Cygwin is supported with the +GNU Hurd. Mac OS X is supported with the +Xquartz(__appmansuffix__) X server. Win32/Cygwin is supported with the XWin(__appmansuffix__) X server. .PP .SH "NETWORK CONNECTIONS" diff --git a/xorg-server/hw/xfree86/doc/sgml/Makefile.am b/xorg-server/hw/xfree86/doc/sgml/Makefile.am index 7756c47ac..e6661c544 100644 --- a/xorg-server/hw/xfree86/doc/sgml/Makefile.am +++ b/xorg-server/hw/xfree86/doc/sgml/Makefile.am @@ -19,13 +19,9 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -XML_FILES = DESIGN.xml - -include ../../../../doc/xml/xmlrules.in +doc_sources = DESIGN.xml +# Developer's documentation is not installed if ENABLE_DEVEL_DOCS -noinst_DATA = $(BUILT_DOC_FILES) +include $(top_srcdir)/doc/xml/xmlrules-noinst.in endif -CLEANFILES = $(CLEAN_DOC_FILES) - -EXTRA_DIST = $(XML_FILES) diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 0f4c40c09..2b19d82ad 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -1731,6 +1731,7 @@ xf86RandR12EnterVT (int screen_index, int flags) ScreenPtr pScreen = screenInfo.screens[screen_index]; ScrnInfoPtr pScrn = xf86Screens[screen_index]; XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + rrScrPrivPtr rp = rrGetScrPriv(pScreen); Bool ret; if (randrp->orig_EnterVT) { @@ -1742,6 +1743,11 @@ xf86RandR12EnterVT (int screen_index, int flags) return FALSE; } + /* reload gamma */ + int i; + for (i = 0; i < rp->numCrtcs; i++) + xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]); + return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */ } @@ -1751,6 +1757,7 @@ xf86RandR12Init12 (ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; rrScrPrivPtr rp = rrGetScrPriv(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + int i; rp->rrGetInfo = xf86RandR12GetInfo12; rp->rrScreenSetSize = xf86RandR12ScreenSetSize; @@ -1780,6 +1787,9 @@ xf86RandR12Init12 (ScreenPtr pScreen) */ if (!xf86RandR12SetInfo12 (pScreen)) return FALSE; + for (i = 0; i < rp->numCrtcs; i++) { + xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]); + } return TRUE; } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index 7be65dcf9..7adf0ff73 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -85,7 +85,11 @@ static void *console_handler; static void drain_console(int fd, void *closure) { - tcflush(fd, TCIOFLUSH); + errno = 0; + if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) { + xf86RemoveGeneralHandler(console_handler); + console_handler = NULL; + } } void diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 3d972cf2c..264c1fbea 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -1023,6 +1023,34 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe } #endif +#ifdef DEBUG_UNTRUSTED_POINTER_DELTA +static const char *untrusted_str(NSEvent *e) { + switch([e type]) { + case NSScrollWheel: + return "NSScrollWheel"; + case NSTabletPoint: + return "NSTabletPoint"; + case NSOtherMouseDown: + return "NSOtherMouseDown"; + case NSOtherMouseUp: + return "NSOtherMouseUp"; + case NSLeftMouseDown: + return "NSLeftMouseDown"; + case NSLeftMouseUp: + return "NSLeftMouseUp"; + default: + switch([e subtype]) { + case NSTabletPointEventSubtype: + return "NSTabletPointEventSubtype"; + case NSTabletProximityEventSubtype: + return "NSTabletProximityEventSubtype"; + default: + return "Other"; + } + } +} +#endif + - (void) sendX11NSEvent:(NSEvent *)e { NSPoint location = NSZeroPoint, tilt = NSZeroPoint; int ev_button, ev_type; @@ -1060,6 +1088,10 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta // deltaXY for wheel events are being sent as mouse movement hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSScrollWheel; + +#ifdef DEBUG_UNTRUSTED_POINTER_DELTA + hasUntrustedPointerDelta = hasUntrustedPointerDelta || [e type] == NSLeftMouseDown || [e type] == NSLeftMouseUp; +#endif if (window != nil) { NSRect frame = [window frame]; @@ -1068,8 +1100,22 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe location.y += frame.origin.y; lastpt = location; } else if(hasUntrustedPointerDelta) { +#ifdef DEBUG_UNTRUSTED_POINTER_DELTA + ErrorF("--- Begin Event Debug ---\n"); + ErrorF("Event type: %s\n", untrusted_str(e)); + ErrorF("old lastpt: (%0.2f, %0.2f)\n", lastpt.x, lastpt.y); + ErrorF(" delta: (%0.2f, %0.2f)\n", [e deltaX], -[e deltaY]); + ErrorF(" location: (%0.2f, %0.2f)\n", lastpt.x + [e deltaX], lastpt.y - [e deltaY]); + ErrorF("workaround: (%0.2f, %0.2f)\n", [e locationInWindow].x, [e locationInWindow].y); + ErrorF("--- End Event Debug ---\n"); + + location.x = lastpt.x + [e deltaX]; + location.y = lastpt.y - [e deltaY]; + lastpt = [e locationInWindow]; +#else location = [e locationInWindow]; lastpt = location; +#endif } else { location.x = lastpt.x + [e deltaX]; location.y = lastpt.y - [e deltaY]; diff --git a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist index d6c492152..469caad4a 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 97 + 99 LprojLocale es LprojRevisionLevel 1 LprojVersion - 97 + 99 diff --git a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib index 4a26e33ec..ebf843c50 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib @@ -2,15 +2,18 @@ 1040 - 11A79a - 784 - 1059 - 478.00 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 784 + 787 - + + + + com.apple.InterfaceBuilder.CocoaPlugin @@ -366,7 +369,8 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} @@ -377,7 +381,6 @@ 256 {{13, 10}, {593, 292}} - @@ -392,7 +395,6 @@ 256 {{18, 215}, {402, 18}} - YES 67239424 @@ -424,7 +426,6 @@ 256 {{36, 65}, {501, 28}} - YES 67239424 @@ -443,7 +444,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -462,7 +463,6 @@ 256 {{36, 181}, {501, 28}} - YES 67239424 @@ -481,7 +481,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA256 {{18, 99}, {402, 18}} - YES 67239424 @@ -504,7 +503,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA256 {{36, 123}, {501, 28}} - YES 67239424 @@ -522,7 +520,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA256 {{18, 157}, {402, 18}} - YES 67239424 @@ -545,7 +542,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA256 {{36, 7}, {501, 28}} - YES 67239424 @@ -562,7 +558,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA256 {{18, 41}, {402, 18}} - YES 67239424 @@ -583,7 +578,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA {{10, 33}, {573, 246}} - Entrada @@ -1248,11 +1242,10 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA {619, 308} - {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1265,10 +1258,11 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 @@ -1350,7 +1344,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - 121.73100280761719 + 105 62.730998992919922 1000 @@ -1360,7 +1354,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1417,7 +1411,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - 82 + 99 10 1000 @@ -1497,7 +1491,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1507,7 +1501,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA1 _doScroller: - 0.96474358974358976 + 0.96474361419677734 @@ -1532,6 +1526,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA + QSAAAEEgAABBmAAAQZgAAA @@ -1559,10 +1554,11 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA {454, 271} + {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps diff --git a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib index 806c0e84a..4626ac776 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist index 4be9fe030..30ee9ca2d 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 98 + 100 LprojLocale ar LprojRevisionLevel 1 LprojVersion - 98 + 100 diff --git a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib index d71d7addc..1fac447f3 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib @@ -367,7 +367,7 @@ View - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -459,7 +459,7 @@ controlColor 3 - MC42NjY2NjY2ODY1AA + MC42NjY2NjY2NjY3AA @@ -508,7 +508,7 @@ {{10, 33}, {438, 246}} - أمان + الأمان @@ -637,7 +637,7 @@ {{10, 33}, {438, 246}} - Windows + نوافذ @@ -853,7 +853,7 @@ 67239424 71303296 - تستخدم إشارات X11 الصوتية تنبيه النظام القياسي، كما هو محدد في لوحة تفضيلات النظام لمؤثرات الصوت. + تستخدم إشارات X11 الصوتية التنبيه القياسي للنظام، كما هو محدد في لوحة تفضيلات النظام لمؤثرات الصوت. @@ -908,7 +908,7 @@ - 256 لونًا + ٢٥٦ لونًا 1048576 2147483647 @@ -1035,7 +1035,7 @@ 67239424 71303296 - تمكين نافذة X11 الجذري. استخدم ضغط مفاتيح الأوامر-الاختيار-A لدخول ومغادرة وضع ملء الشاشة. + تمكين نافذة X11 root. استخدم ضغط مفاتيح الأوامر-الاختيار-A لدخول ومغادرة وضع ملء الشاشة. @@ -1145,7 +1145,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 67239424 71303296 - السماح بكتابة تغييرات قائمة الإدخال فوق مخطط مفاتيح X11 الحالي. + السماح لتغييرات قائمة الإدخال بالكتابة فوق مخطط مفاتيح X11 الحالي. @@ -1183,7 +1183,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 67239424 71303296 - عند التمكين، مفاتيح الخيار إرسال Alt_L و Alt_R X11 علامات المفتاح بدلًا من Mode_switch. + عند تمكينها، تقوم مفاتيح الاختيار بإرسال علامات المفتاح Alt_L و Alt_R X11 بدلًا من Mode_switch. @@ -1199,7 +1199,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 67239424 67108992 - مفاتيح الخيار إرسال Alt_L و Alt_R + مفاتيح الاختيار تقوم بإرسال Alt_L و Alt_R 1210864127 @@ -1216,7 +1216,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {{10, 33}, {438, 246}} - إدخال + الإدخال @@ -1235,7 +1235,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {{0, 0}, {1280, 938}} {320, 262} - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_prefs @@ -1249,10 +1249,10 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF View - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 @@ -1260,7 +1260,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 268 {{14, 191}, {100, 32}} - YES 67239424 @@ -1288,7 +1287,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 268 {{14, 159}, {100, 32}} - YES 67239424 @@ -1320,14 +1318,12 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {301, 198} - YES 256 {301, 17} - @@ -1335,7 +1331,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{302, 0}, {16, 17}} - @@ -1468,7 +1463,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {{1, 17}, {301, 198}} - @@ -1479,7 +1473,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{302, 17}, {15, 198}} - _doScroller: 0.99492377042770386 @@ -1489,7 +1482,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{1, 215}, {301, 15}} - 1 _doScroller: @@ -1503,7 +1495,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {{1, 0}, {301, 17}} - @@ -1513,14 +1504,12 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {{116, 20}, {318, 231}} - 50 - QSAAAEEgAABBmAAAQZgAAA @@ -1528,7 +1517,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 268 {{14, 223}, {100, 32}} - YES -2080244224 @@ -1549,12 +1537,10 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF {454, 271} - - {{0, 0}, {1280, 938}} {320, 262} - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_apps diff --git a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib index f86a5b9f2..97032d978 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/locversion.plist index ed1210184..3cba12a62 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 97 + 100 LprojLocale da LprojRevisionLevel 1 LprojVersion - 97 + 100 diff --git a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib index d081118d1..430a58303 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib @@ -2,13 +2,13 @@ 1040 - 11A79a - 732 - 1059 - 478.00 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 @@ -366,6 +366,7 @@ View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -1067,7 +1068,7 @@ ZW4uCg 67239424 4194304 - Fokus i X11-vinduet følger markøren + Fokus i X11-vinduet følger markøren. @@ -1254,6 +1255,7 @@ ZW4uCg View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -1518,7 +1520,6 @@ ZW4uCg - QSAAAEEgAABBmAAAQZgAAA @@ -3572,6 +3573,7 @@ ZW4uCg 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -3579,5 +3581,10 @@ ZW4uCg YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib index e5f27d575..918cbc465 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist index 0acbad7ac..64befbabd 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 97 + 100 LprojLocale pl LprojRevisionLevel 1 LprojVersion - 97 + 100 diff --git a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib index aacaa76ae..082a39e19 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib @@ -2,13 +2,13 @@ 1040 - 11A79a - 732 - 1059 - 478.00 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 @@ -257,7 +257,7 @@ - Miniaturka + Minimalizuj okno m 1048576 2147483647 @@ -366,6 +366,7 @@ View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -1028,7 +1029,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 67239424 4194304 - Lliknięcie nieaktywnego okna będzie powodowało jego uaktywnienie i przeniesienie do niego fokusu. + Kliknięcie nieaktywnego okna będzie powodowało jego uaktywnienie i przeniesienie do niego fokusu. @@ -1256,6 +1257,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -1523,7 +1525,6 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - QSAAAEEgAABBmAAAQZgAAA @@ -3583,6 +3584,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -3590,5 +3592,10 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib index d9672ee6a..62f4065f6 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist index 052f2a9e3..443fca6e3 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 97 + 100 LprojLocale pt LprojRevisionLevel 1 LprojVersion - 97 + 100 diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib index d28bfb48e..2c386a880 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib @@ -2,13 +2,13 @@ 1040 - 11A79a - 732 - 1059 - 478.00 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 @@ -296,8 +296,8 @@ Percorrer Janelas no Sentido Inverso - ~ - 1179914 + ` + 1179648 2147483647 @@ -315,7 +315,7 @@ - Trazer Tudo para Frente + Trazer Todas Para a Frente 1048576 2147483647 @@ -366,10 +366,11 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 @@ -377,6 +378,7 @@ 256 {{13, 10}, {618, 292}} + @@ -389,8 +391,9 @@ 256 - {{18, 210}, {402, 18}} + {{18, 214}, {402, 18}} + YES 67239424 @@ -422,6 +425,7 @@ 256 {{36, 60}, {548, 31}} + YES 67239424 @@ -440,7 +444,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -457,8 +461,9 @@ 256 - {{36, 162}, {548, 42}} + {{36, 166}, {548, 42}} + YES 67239424 @@ -478,6 +483,7 @@ ZS4KA 256 {{18, 97}, {402, 18}} + YES 67239424 @@ -498,13 +504,14 @@ ZS4KA 256 - {{36, 126}, {548, 14}} + {{36, 121}, {548, 28}} + YES 67239424 4194304 - Permitir que as mudanças no menu de entrada sobreescrevam o mapa do teclado atual do X11. + Permite que as alterações feitas no menu de leiautes de teclado sobrescrevam o mapa de teclado atual do X11. @@ -515,8 +522,9 @@ ZS4KA 256 - {{18, 146}, {402, 18}} + {{18, 153}, {402, 18}} + YES 67239424 @@ -537,8 +545,9 @@ ZS4KA 256 - {{36, -1}, {385, 31}} + {{36, -1}, {548, 31}} + YES 67239424 @@ -555,6 +564,7 @@ ZS4KA 256 {{18, 36}, {402, 18}} + YES 67239424 @@ -575,6 +585,7 @@ ZS4KA {{10, 33}, {598, 246}} + Entrada @@ -1238,10 +1249,12 @@ ZS4KA {644, 308} + + {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1254,10 +1267,11 @@ ZS4KA View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 @@ -1265,6 +1279,7 @@ ZS4KA 265 {{372, 191}, {132, 32}} + YES 67239424 @@ -1292,6 +1307,7 @@ ZS4KA 265 {{372, 159}, {132, 32}} + YES 67239424 @@ -1323,12 +1339,14 @@ ZS4KA 256 {333, 198} + YES 256 {333, 17} + @@ -1336,11 +1354,12 @@ ZS4KA 256 {{334, 0}, {16, 17}} + - 132.73099999999999 - 62.731000000000002 + 132.73100280761719 + 62.730998992919922 1000 75628096 @@ -1349,7 +1368,7 @@ ZS4KA 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1471,6 +1490,7 @@ ZS4KA {{1, 17}, {333, 198}} + @@ -1481,19 +1501,21 @@ ZS4KA 256 {{334, 17}, {15, 198}} + _doScroller: - 0.99492380000000002 + 0.99492377042770386 256 {{1, 215}, {333, 15}} + 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 @@ -1503,6 +1525,7 @@ ZS4KA {{1, 0}, {333, 17}} + @@ -1512,6 +1535,7 @@ ZS4KA {{20, 20}, {350, 231}} + 50 @@ -1526,6 +1550,7 @@ ZS4KA 265 {{372, 223}, {132, 32}} + YES -2080244224 @@ -1546,10 +1571,12 @@ ZS4KA {519, 271} + + {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps @@ -3259,6 +3286,7 @@ ZS4KA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3315,9 +3343,9 @@ ZS4KA com.apple.InterfaceBuilder.CocoaPlugin {{271, 666}, {301, 153}} - {{507, 565}, {484, 308}} + {{507, 548}, {644, 308}} com.apple.InterfaceBuilder.CocoaPlugin - {{507, 565}, {484, 308}} + {{507, 548}, {644, 308}} {{184, 290}, {481, 345}} @@ -3334,11 +3362,11 @@ ZS4KA {{100, 746}, {155, 33}} com.apple.InterfaceBuilder.CocoaPlugin - {{68, 585}, {454, 271}} + {{68, 585}, {519, 271}} com.apple.InterfaceBuilder.CocoaPlugin - {{68, 585}, {454, 271}} + {{68, 585}, {519, 271}} {{433, 406}, {486, 327}} @@ -3347,7 +3375,7 @@ ZS4KA {320, 240} com.apple.InterfaceBuilder.CocoaPlugin - {{145, 1011}, {336, 20}} + {{145, 836}, {337, 20}} com.apple.InterfaceBuilder.CocoaPlugin {{67, 819}, {336, 20}} @@ -3452,6 +3480,7 @@ ZS4KA com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3572,6 +3601,7 @@ ZS4KA 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx @@ -3579,5 +3609,10 @@ ZS4KA YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib index 1b68c4588..d84701f2e 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist index b4f44a14d..b86ec7136 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist +++ b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 97 + 99 LprojLocale sv LprojRevisionLevel 1 LprojVersion - 97 + 99 diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib index d662aa362..16b01eb79 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib @@ -2,13 +2,13 @@ 1040 - 11A79a - 784 - 1059 - 478.00 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 784 + 787 @@ -366,10 +366,11 @@ View - {3.4028235e+38, 3.4028235e+38} + + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 @@ -377,7 +378,6 @@ 256 {{13, 10}, {458, 292}} - @@ -392,7 +392,6 @@ 256 {{18, 210}, {402, 18}} - YES 67239424 @@ -424,7 +423,6 @@ 256 {{36, 56}, {385, 31}} - YES 67239424 @@ -443,7 +441,7 @@ controlColor 3 - MC42NjY2NjY2ODY1AA + MC42NjY2NjY2NjY3AA @@ -462,7 +460,6 @@ 256 {{36, 164}, {385, 42}} - YES 67239424 @@ -481,7 +478,6 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 {{18, 91}, {402, 18}} - YES 67239424 @@ -504,12 +500,11 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 {{36, 116}, {400, 29}} - YES 67239424 4194304 - Tillåter att ändringar i indatamenyn skriver över de befintliga X11-tangentkopplingarna. + Tillåter att ändringar i inmatningsmenyn skriver över de befintliga X11-tangentkopplingarna. @@ -522,7 +517,6 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 {{18, 149}, {402, 18}} - YES 67239424 @@ -545,7 +539,6 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 {{36, 1}, {385, 31}} - YES 67239424 @@ -562,7 +555,6 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 {{18, 36}, {402, 18}} - YES 67239424 @@ -583,7 +575,6 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo {{10, 33}, {438, 246}} - Indata @@ -1252,12 +1243,10 @@ cmthIGlubmVow6VsbGV0Lgo {484, 308} - - {{0, 0}, {1440, 878}} {320, 262} - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_prefs @@ -1270,7 +1259,8 @@ cmthIGlubmVow6VsbGV0Lgo View - {3.4028235e+38, 3.4028235e+38} + + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} @@ -1490,6 +1480,7 @@ cmthIGlubmVow6VsbGV0Lgo {{1, 17}, {301, 198}} + 4 @@ -1521,6 +1512,7 @@ cmthIGlubmVow6VsbGV0Lgo {{1, 0}, {301, 17}} + 4 @@ -1529,12 +1521,12 @@ cmthIGlubmVow6VsbGV0Lgo {{20, 20}, {318, 231}} + 50 - QSAAAEEgAABBmAAAQZgAAA @@ -1565,7 +1557,7 @@ cmthIGlubmVow6VsbGV0Lgo {{0, 0}, {1440, 878}} {320, 262} - {3.4028235e+38, 3.4028235e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_apps diff --git a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib index c623b1ad8..5b17831b9 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib index d6b32a1fc..423872f15 100644 --- a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib +++ b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib @@ -960,7 +960,7 @@ moTpvKDmoIfmjInplK7jgIIKA 67239424 4194304 - 如果您想要使用 xclipboard、klipper 或其他任何 X11 夹纸板管理程序,请停用此选项。 + 如果您想要使用 xclipboard、klipper 或其他任何 X11 剪切板管理程序,请停用此选项。 diff --git a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib index d8f5f8b75..e422e43f7 100644 Binary files a/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib and b/xorg-server/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib differ diff --git a/xorg-server/hw/xquartz/bundle/mk_bundke.sh b/xorg-server/hw/xquartz/bundle/mk_bundke.sh index c85b21765..37e555f9e 100644 --- a/xorg-server/hw/xquartz/bundle/mk_bundke.sh +++ b/xorg-server/hw/xquartz/bundle/mk_bundke.sh @@ -1,30 +1,31 @@ -#!/bin/sh -# -# 'Cause xcodebuild is hard to deal with - -SRCDIR=$1 -BUILDDIR=$2 -BUNDLE_ROOT=$3 - -localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW" -for lang in ${localities} ; do - mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib - [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1 - - for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do - install -m 644 ${SRCDIR}/Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} - done -done - -install -m 644 ${SRCDIR}/Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib -install -m 644 ${SRCDIR}/Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources - -install -m 644 ${BUILDDIR}/Info.plist ${BUNDLE_ROOT}/Contents -install -m 644 ${SRCDIR}/PkgInfo ${BUNDLE_ROOT}/Contents - -mkdir -p ${BUNDLE_ROOT}/Contents/MacOS -install -m 755 ${SRCDIR}/X11.sh ${BUNDLE_ROOT}/Contents/MacOS/X11 - -if [[ $(id -u) == 0 ]] ; then - chown -R root:admin ${BUNDLE_ROOT} -fi +#!/bin/sh +# +# 'Cause xcodebuild is hard to deal with + +SRCDIR=$1 +BUILDDIR=$2 +BUNDLE_ROOT=$3 + +localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW" +for lang in ${localities} ; do + [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj ] && rm -rf ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj + mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib + [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1 + + for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do + install -m 644 ${SRCDIR}/Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} + done +done + +install -m 644 ${SRCDIR}/Resources/English.lproj/main.nib/designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib +install -m 644 ${SRCDIR}/Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources + +install -m 644 ${BUILDDIR}/Info.plist ${BUNDLE_ROOT}/Contents +install -m 644 ${SRCDIR}/PkgInfo ${BUNDLE_ROOT}/Contents + +mkdir -p ${BUNDLE_ROOT}/Contents/MacOS +install -m 755 ${SRCDIR}/X11.sh ${BUNDLE_ROOT}/Contents/MacOS/X11 + +if [[ $(id -u) == 0 ]] ; then + chown -R root:admin ${BUNDLE_ROOT} +fi diff --git a/xorg-server/hw/xquartz/darwinXinput.c b/xorg-server/hw/xquartz/darwinXinput.c index 85ce9d608..527c5bcff 100644 --- a/xorg-server/hw/xquartz/darwinXinput.c +++ b/xorg-server/hw/xquartz/darwinXinput.c @@ -63,25 +63,6 @@ SOFTWARE. #include "XIstubs.h" #include "darwin.h" -/*********************************************************************** - * - * Caller: ProcXCloseDevice - * - * Take care of implementation-dependent details of closing a device. - * Some implementations may actually close the device, others may just - * remove this clients interest in that device. - * - * The default implementation is to do nothing (assume all input devices - * are initialized during X server initialization and kept open). - * - */ - -void -CloseInputDevice(DeviceIntPtr d, ClientPtr client) -{ - DEBUG_LOG("CloseInputDevice(%p, %p)\n", d, client); -} - /**************************************************************************** * * Caller: ProcXSetDeviceMode diff --git a/xorg-server/hw/xquartz/xpr/dri.c b/xorg-server/hw/xquartz/xpr/dri.c index 252c2bb4c..7b730df8e 100644 --- a/xorg-server/hw/xquartz/xpr/dri.c +++ b/xorg-server/hw/xquartz/xpr/dri.c @@ -89,14 +89,6 @@ static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ static Bool DRIFreePixmapImp(DrawablePtr pDrawable); -/* FIXME: don't hardcode this? */ -#define CG_INFO_FILE "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/Info-macos.plist" - -/* Corresponds to SU Jaguar Green */ -#define CG_REQUIRED_MAJOR 1 -#define CG_REQUIRED_MINOR 157 -#define CG_REQUIRED_MICRO 11 - typedef struct { DrawablePtr pDrawable; int refCount; @@ -109,96 +101,6 @@ typedef struct { void *buffer; } DRIPixmapBuffer, *DRIPixmapBufferPtr; -/* Returns version as major.minor.micro in 10.10.10 fixed form */ -static unsigned int -get_cg_version (void) -{ - static unsigned int version; - - FILE *fh; - char *ptr; - - if (version != 0) - return version; - - /* I tried CFBundleGetVersion, but it returns zero, so.. */ - - fh = fopen (CG_INFO_FILE, "r"); - if (fh != NULL) - { - char buf[256]; - - while (fgets (buf, sizeof (buf), fh) != NULL) - { - unsigned char c; - - if (!strstr (buf, "CFBundleShortVersionString") - || fgets (buf, sizeof (buf), fh) == NULL) - { - continue; - } - - ptr = strstr (buf, ""); - if (ptr == NULL) - continue; - - ptr += strlen (""); - - /* Now PTR points to "MAJOR.MINOR.MICRO". */ - - version = 0; - - again: - switch ((c = *ptr++)) - { - case '.': - version = version * 1024; - goto again; - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - version = ((version & ~0x3ff) - + (version & 0x3ff) * 10 + (c - '0')); - goto again; - } - break; - } - - fclose (fh); - } - - return version; -} - -static Bool -test_cg_version (unsigned int major, unsigned int minor, unsigned int micro) -{ - unsigned int cg_ver = get_cg_version (); - - unsigned int cg_major = (cg_ver >> 20) & 0x3ff; - unsigned int cg_minor = (cg_ver >> 10) & 0x3ff; - unsigned int cg_micro = cg_ver & 0x3ff; - - if (cg_major > major) - return TRUE; - else if (cg_major < major) - return FALSE; - - /* cg_major == major */ - - if (cg_minor > minor) - return TRUE; - else if (cg_minor < minor) - return FALSE; - - /* cg_minor == minor */ - - if (cg_micro < micro) - return FALSE; - - return TRUE; -} - Bool DRIScreenInit(ScreenPtr pScreen) { @@ -224,20 +126,6 @@ DRIScreenInit(ScreenPtr pScreen) pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->nrWindows = 0; - /* Need recent cg for window access update */ - if (!test_cg_version (CG_REQUIRED_MAJOR, - CG_REQUIRED_MINOR, - CG_REQUIRED_MICRO)) - { - ErrorF ("[DRI] disabled direct rendering; requires CoreGraphics %d.%d.%d\n", - CG_REQUIRED_MAJOR, CG_REQUIRED_MINOR, CG_REQUIRED_MICRO); - - pDRIPriv->directRenderingSupport = FALSE; - - /* Note we don't nuke the dri private, since we need it for - managing indirect surfaces. */ - } - /* Initialize drawable tables */ for (i = 0; i < DRI_MAX_DRAWABLES; i++) { pDRIPriv->DRIDrawables[i] = NULL; diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h index edb7988c3..325d5934f 100644 --- a/xorg-server/include/inputstr.h +++ b/xorg-server/include/inputstr.h @@ -57,7 +57,7 @@ SOFTWARE. #include "geext.h" #include "privates.h" -#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) +#define BitIsOn(ptr, bit) (!!(((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))) #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) #define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7))) extern _X_EXPORT int CountBits(const uint8_t *mask, int len); diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c index abcc8926b..877e9776b 100644 --- a/xorg-server/test/input.c +++ b/xorg-server/test/input.c @@ -683,42 +683,82 @@ static void dix_grab_matching(void) g_assert(rc == TRUE); } -static void include_byte_padding_macros(void) +static void test_bits_to_byte(int i) { - int i; - g_test_message("Testing bits_to_bytes()"); - - /* the macros don't provide overflow protection */ - for (i = 0; i < INT_MAX - 7; i++) - { int expected_bytes; expected_bytes = (i + 7)/8; g_assert(bits_to_bytes(i) >= i/8); g_assert((bits_to_bytes(i) * 8) - i <= 7); - } + g_assert(expected_bytes == bits_to_bytes(i)); +} - g_test_message("Testing bytes_to_int32()"); - for (i = 0; i < INT_MAX - 3; i++) - { +static void test_bytes_to_int32(int i) +{ int expected_4byte; expected_4byte = (i + 3)/4; g_assert(bytes_to_int32(i) <= i); g_assert((bytes_to_int32(i) * 4) - i <= 3); - } - - g_test_message("Testing pad_to_int32"); + g_assert(expected_4byte == bytes_to_int32(i)); +} - for (i = 0; i < INT_MAX - 3; i++) - { +static void test_pad_to_int32(int i) +{ int expected_bytes; expected_bytes = ((i + 3)/4) * 4; g_assert(pad_to_int32(i) >= i); g_assert(pad_to_int32(i) - i <= 3); - } + g_assert(expected_bytes == pad_to_int32(i)); +} +static void include_byte_padding_macros(void) +{ + g_test_message("Testing bits_to_bytes()"); + + /* the macros don't provide overflow protection */ + test_bits_to_byte(0); + test_bits_to_byte(1); + test_bits_to_byte(2); + test_bits_to_byte(7); + test_bits_to_byte(8); + test_bits_to_byte(0xFF); + test_bits_to_byte(0x100); + test_bits_to_byte(INT_MAX - 9); + test_bits_to_byte(INT_MAX - 8); + + g_test_message("Testing bytes_to_int32()"); + test_bytes_to_int32(0); + test_bytes_to_int32(1); + test_bytes_to_int32(2); + test_bytes_to_int32(7); + test_bytes_to_int32(8); + test_bytes_to_int32(0xFF); + test_bytes_to_int32(0x100); + test_bytes_to_int32(0xFFFF); + test_bytes_to_int32(0x10000); + test_bytes_to_int32(0xFFFFFF); + test_bytes_to_int32(0x1000000); + test_bytes_to_int32(INT_MAX - 4); + test_bytes_to_int32(INT_MAX - 3); + + g_test_message("Testing pad_to_int32"); + + test_pad_to_int32(0); + test_pad_to_int32(0); + test_pad_to_int32(1); + test_pad_to_int32(2); + test_pad_to_int32(7); + test_pad_to_int32(8); + test_pad_to_int32(0xFF); + test_pad_to_int32(0x100); + test_pad_to_int32(0xFFFF); + test_pad_to_int32(0x10000); + test_pad_to_int32(0xFFFFFF); + test_pad_to_int32(0x1000000); + test_pad_to_int32(INT_MAX - 4); + test_pad_to_int32(INT_MAX - 3); } static void xi_unregister_handlers(void) @@ -1010,7 +1050,22 @@ static void dix_valuator_mode(void) g_assert(valuator_get_mode(&dev, i) == Relative); } +static void include_bit_test_macros(void) +{ + uint8_t mask[9] = { 0 }; + int i; + for (i = 0; i < sizeof(mask)/sizeof(mask[0]); i++) + { + g_assert(BitIsOn(mask, i) == 0); + SetBit(mask, i); + g_assert(BitIsOn(mask, i) == 1); + g_assert(!!(mask[i/8] & (1 << (i % 8)))); + g_assert(CountBits(mask, sizeof(mask)) == 1); + ClearBit(mask, i); + g_assert(BitIsOn(mask, i) == 0); + } +} int main(int argc, char** argv) { @@ -1026,6 +1081,7 @@ int main(int argc, char** argv) g_test_add_func("/dix/input/grab_matching", dix_grab_matching); g_test_add_func("/dix/input/valuator_mode", dix_valuator_mode); g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros); + g_test_add_func("/include/bit_test_macros", include_bit_test_macros); g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers); -- cgit v1.2.3