We must not leave the hinting settings as their defaults,
because if we did, that would mean using the surface defaults
which might or might not use hinting (xlib does by default.)
Since we make measurements outside of the context of a surface
(-advancementForGlyph:), we need to ensure that the same
hinting settings are used there as when we draw. For now,
just force hinting to be off.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34612 72102866-910b-0410-8b05-ffd578937521
code to only combine an uninterrupted set of scroll events.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34558 72102866-910b-0410-8b05-ffd578937521
* Source/x11/XGServerEvent.m (-receivedEvent:type:extra:forMode:):
Only read one event from the xlib event queue, instead of all of them.
* Source/x11/XGServerEvent.m (-getEventMatchingMask:beforeDate:inMode:):
Remove call to -receivedEvent:type:extra:forMode:
* Source/x11/XGServerEvent.m (-discardEventsMatchingMask:beforeEvent:):
Remove call to -receivedEvent:type:extra:forMode:
These changes are an attempt to fix a bug where a steady stream
of X events can postpone autodisplay indefinitely. To see it, open
a long document in Ink and scroll with the mousewheel slowly but
continuously. If you scroll steadily enough, the window will not
update until you stop scrolling.
This occurs beacuse autodisplay only occurs when the AppKit event
queue is empty and the runloop runs, and without the above changes,
the AppKit event queue was filling up and not emptying until the
mousewheel events stopped arriving.
In the long run I think we should get rid of the AppKit event queue
and have XGServer override the default implementation of
-[GSDisplayServer getEventMatchingMask:beforeDate:inMode:dequeue:]
and related methods with custom ones that interact
directly with the Xlib event queue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34553 72102866-910b-0410-8b05-ffd578937521
* Source/cairo/CairoFontEnumerator.m,
* Source/xlib/GSXftFontInfo.m,
* Source/xlib/XGFont.m: Use NSDebugLLog instead of NSDebugLog to
reduce amount of default output.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34493 72102866-910b-0410-8b05-ffd578937521
Update the current point after drawing text. Should not affect
anything in gui right now, but will be useful later.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34388 72102866-910b-0410-8b05-ffd578937521
Add a hack to get landscape printing working. Comment in the source
reproduced here:
FIXME: This is confusing... When an 8.5x11 page is set to
landscape, NSPrintInfo also swaps the paperSize to be 11x8.5,
but gui also adds a 90 degree rotation as if it will
be drawing on a 8.5x11 page. So, swap 11x8.5 back to 8.5x11 here.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34356 72102866-910b-0410-8b05-ffd578937521
paper size from print info to set the cairo page size, instead
of using the bounding box (which is usually smaller than the
paper size, and was causing cairo print output to be wrong
compared to GNUstep's built-in PostScript writer.)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34351 72102866-910b-0410-8b05-ffd578937521
GLX_BUFFER_SIZE for NSOpenGLPFAColorSize instead of setting all
the single colour sizes, which was wrong.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34136 72102866-910b-0410-8b05-ffd578937521
* Source/gsc/GSContext.m:
* Source/gsc/GSGState.m:
* Headers/gsc/GSGStateOps.h: Change type for -GSSetFillColor: and
-GSSetStrokeColor: from float to CGFloat
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34071 72102866-910b-0410-8b05-ffd578937521
for old versions of fontconfig.
Patch by Richard Frith-Macdonald <rfm@gnu.org>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34035 72102866-910b-0410-8b05-ffd578937521
* Source/cairo/CairoContext.m:
* Source/cairo/CairoSurface.m:
* Source/cairo/XGCairoModernSurface.m:
* Headers/cairo/XGCairoModernSurface.h:
* Headers/cairo/CairoSurface.h: New cairo surface which uses
cairo_surface_create_similar to create a back buffer which
has an alpha channel, even if the X server doesn't support
surfaces with alpha. This new surface is also made the default
since this seems to be the recommended way to double buffer
with cairo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33978 72102866-910b-0410-8b05-ffd578937521
because it fixes the corrupted display problem reported by Riccardo
on 16-bit displays.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33849 72102866-910b-0410-8b05-ffd578937521
-drawGradient:...): Check that the _ct isnt NULL.
* Source/cairo/CairoGState.m (doubleFromUserSpace,
floatToUserSpace): Use correct types in these helper functions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33830 72102866-910b-0410-8b05-ffd578937521
GSDragOperationForAction): Corrected drag type conversion.
Patch by Andreas Schick <andreas.schik@googlemail.com>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33829 72102866-910b-0410-8b05-ffd578937521
context is non-NULL before calling cairo_get_target on it. Log a warning
when either the source context or target context is NULL.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33828 72102866-910b-0410-8b05-ffd578937521
on the pattern to prevent blurred edges when scaling up.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33759 72102866-910b-0410-8b05-ffd578937521
0, temporarily set it to 1 unit wide (in device space.) This
is an attempt at matching the behaviour of the setlinewidth
PostScript operator, which is supposed to interpret 0 as meaning
the thinnest line that the output device can draw.
Note that Quartz (and cairo) draw nothing with a line width of 0.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33739 72102866-910b-0410-8b05-ffd578937521
Scale the result by 0.75 so the Windows default of 96 DPI is
mapped to the GNUstep default of 72 DPI. While this sounds wrong,
72 and 96 are just "virtual" DPI's; both mean 1 point = 1 pixel,
so it's actually the right thing to do.
* Source/x11/XGServerWindow.m (-resolutionForScreen:):
Comment out the implementation and just return 72 for now,
because I'm not sure if we can trust the value the X server
gives us.
NOTE: Currently -gui ignores these methods and only looks at the
GSScaleFactor user default. I'm going to make -gui use the server
values now, because it's safe to do so on Windows (the system
DPI is set by the user, and affects all applications.)
NOTE: We might consider refactoring these methods to be called
scaleFactorForScreen: to make it clearer what they do.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33658 72102866-910b-0410-8b05-ffd578937521
imagecursor support.) configure test is still TODO, so it isn't
compiled in at the moment.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33563 72102866-910b-0410-8b05-ffd578937521
* Source/cairo/CairoGState.m: Remove most of the rounding code and
implementation of DPSstrokeadjust.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33492 72102866-910b-0410-8b05-ffd578937521
* Source/art/path.m (-DPSrectfill::::),
* Source/xlib/XGGState.m (-DPSrectfill::::): Change name of local
variable to avoid compiler warning.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33365 72102866-910b-0410-8b05-ffd578937521
gstate.
* Headers/cairo/CairoGState.h (-supportsDrawGState): Declare this method.
* Source/cairo/CairoGState.m (-supportsDrawGState): Only allow the
faster drawing operation when the clip can be represented as a
list of rectangles.
* Source/cairo/CairoGState.m (-copyWithZone:): Always free the
clip rectangle list.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33289 72102866-910b-0410-8b05-ffd578937521
* Source/art/ARTGState.m:
* Source/cairo/CairoGState.m:
* Source/xlib/XGGState.m:
* Source/gsc/GSContext.m:
* Source/gsc/GSGState.m:
* Headers/gsc/GSGStateOps.h:
Add a new interface, GSShowGlyphsWithAdvances, which replaces
GSShowGlyphs as the primitive text drawing method.
None of the backends implement it properly yet; I simply renamed
the existing -GSShowGlyphs:: methods to -GSShowGlyphsWithAdvances:::,
so they currently ignore the glyph advances.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33121 72102866-910b-0410-8b05-ffd578937521
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33065 72102866-910b-0410-8b05-ffd578937521
* Source/x11/XGServer.m:
* Source/x11/XGServerEvent.m:
* Headers/x11/XGGeneric.h:
* Headers/x11/XGServerWindow.h:
* Headers/x11/XGServer.h:
Implement the _NET_WM_SYNC_REQUEST protocol described here:
http://standards.freedesktop.org/wm-spec/1.3/ar01s06.html
This is supposed to make window resizing smoother when dragging
a resize handle provided by the window manager, by waiting to
change the window manager's frame until the GNUstep window is
finished repainting.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33045 72102866-910b-0410-8b05-ffd578937521
just cache the character set in CairoFaceInfo, but load them
as needed as we were doing before.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32987 72102866-910b-0410-8b05-ffd578937521
* Source/cairo/CairoFaceInfo (-characterSet): Remove the call to
FcFontMatch in -characterSet which was a big performace
bottleneck.
Instead load the character set data when enumerating all fonts in
CairoFontEnumerator.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32986 72102866-910b-0410-8b05-ffd578937521
Added a secondary call to get current mouse position if the first call fails.
* Source/win32/w32_text_focus.m: Cast parameter to appropriate (HWND) type.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31718 72102866-910b-0410-8b05-ffd578937521
to a WM_ACTIVEAPPP message reporting that the app lost focus.
This delivers NSApplicationWillResignActiveNotification
and NSApplicationDidResignActiveNotification, hides panels, etc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31206 72102866-910b-0410-8b05-ffd578937521
* Source/win32/WIN32Server.m:
* Source/win32/w32_movesize.m:
Fix a rather serious error where the extra window data was allocated
in two places (allocated with objc_malloc in the WM_CREATE handler,
and also allocated by Windows using the cbWndExtra field of the window
class structure). Sometimes the window level was accessed from one
memory area and sometimes from the other.
This is a quick fix that leaves the level and ordered properties
in the cbWndExtra area, and the rest is left in the WIN_INTERN
structure.
This fixes the problem where window ordering was broken when running
apps in gdb.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31198 72102866-910b-0410-8b05-ffd578937521
Only look at NSUtilityWindowMask to decide whether to use a thin-
style title bar (WS_EX_TOOLWINDOW).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31080 72102866-910b-0410-8b05-ffd578937521
* Source/x11/XGServerEvent.m: Use NSDeleteCharacter instead of
NSBackSpaceCharacter for the backspace key. This is what Cocoa
and
OpenStep have been doing all the time.
Also use NSBackTabCharacter on X11 when XK_ISO_Left_Tab is
pressed, but don't convert shift-tab into NSBackTabCharacter.
Patch by Derek Fawcus <dfawcus@employees.org>.
M ChangeLog
M Source/win32/WIN32Server.m
M Source/x11/XGServerEvent.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31034 72102866-910b-0410-8b05-ffd578937521
Fix accidental integer division intended to be float division when
setting the timestamp on events. This was causing all timestamps
to be rounded to the nearest second.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31031 72102866-910b-0410-8b05-ffd578937521
* Source/x11/XGGLContext.m:
Apply fix for bug 29705: OpenGL subwindow positioning error
(OpenGL subwindow position was incorrectly calculated when
the window content view was flipped)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31029 72102866-910b-0410-8b05-ffd578937521
so Windows doesn't activate/deactivate any windows when hiding a window.
This fixes the bug where when a tooltip disappeared, it would deactivate
the window the tooltip was over.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31024 72102866-910b-0410-8b05-ffd578937521
- Require a click to be within a distance (retrieved from Windows)
of the last click to count (previously there was no proximity check)
- Allow clicks separated by the Windows double click time interval
to count (e.g. if the Windows double click time interval is n,
clicking at times 0, n, 2n, 3n would produce events with click counts
1, 2, 3, and 4. This matches OS X behaviour. Previously, all clicks
had to be within the windows double click time interval to count as
one group.)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30932 72102866-910b-0410-8b05-ffd578937521
the wrong location by -[NSImage drawXXX] methods.
See bug report #30069
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30829 72102866-910b-0410-8b05-ffd578937521
(-compositeGState:fromRect:toPoint:op:fraction:): Move the usage
of _ct and source->_ct after the check whether they are set.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30588 72102866-910b-0410-8b05-ffd578937521
See bug report #27782
In particular, fixed -[NSImage drawXXX] and -[NSImage composite/dissolveXXX]
methods to work exactly as Cocoa when the Cairo backend is used.
Added a new draw operator (in addition to composite) to the backend. Cairo is
the only backend that implements it for now.
Eliminated as many flipping checks as possible.
Warning: Untested with the winlib backend.
You must update, recompile and install both Back and Gui.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30523 72102866-910b-0410-8b05-ffd578937521
that order front not become active. Also don't bring windows
that are ordering out to the foreground first.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@30142 72102866-910b-0410-8b05-ffd578937521
cairo_pattern_set_extend() on cairo > 1.6.0.
Patch suggested by Eric Wasylishen <ewasylishen@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29868 72102866-910b-0410-8b05-ffd578937521
* Source/win32/w32_general.m: Remove HOTKEY method.
* Source/win32/WIN32Server.m: Remove call to HOTKEY method. Added
function "mask_for_keystate(..)" to implement modifier mappings
on Windows. Also changed process_key_event to use the new function
and changed the call to ToUnicode to use a blank array instead of
modifying the existing keyState array since this was returning the
characters with the modifiers still applied.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29498 72102866-910b-0410-8b05-ffd578937521
Better check for unicode encoding in art fonts.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29410 72102866-910b-0410-8b05-ffd578937521
code to load and set the HICON into the window. Currently,
an .ico file with the same name as the image specified in
NSIcon or CFBundleIconName needs to be provided in the
resources.
NOTE: An enhancement to generate this from the app icon will
follow shortly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29396 72102866-910b-0410-8b05-ffd578937521
Based on proposal by Derk Fawcus <dfawcus+lists-gnustep-dev@employees.org>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29359 72102866-910b-0410-8b05-ffd578937521
Committed by: Gregory John Casamento <greg.casamento@gmail.com>
* Source/win32/w32_text_focus.m: Correction for extra event which
was causing main/key windows to get out of sync in the backend and
gui.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29349 72102866-910b-0410-8b05-ffd578937521
on the ICCCM WM_STATE property and use _NET_WM_STATE only to avoid
generating bogus miniaturize events when using an emwh compliant
window manager. This makes the code more portable and allows
generating reliable window deminiaturize events.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29283 72102866-910b-0410-8b05-ffd578937521
* Source/win32/w32_general.m: Added call to decodeWM_COMMAND:
to -[GSTheme processCommand:] the theme callback which handles
native menus,
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29279 72102866-910b-0410-8b05-ffd578937521
-DPSsetflat: and -DPScurrentflat should not have been transforming
the flatness value with the current transformation matrix.
The effect of this could be seen in the Apple BezierPathLab example;
zooming in on the circle caused it to look more and more like a
polygon.
Also set NSBezierPath default flatness to 0.6 to match OS X
(it was 1.0, which made circles look a bit rough)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29145 72102866-910b-0410-8b05-ffd578937521
* Source/xlib/GSXftFontInfo.m: Use DejaVu as another fallback
font, as Bitstream Vera and FreeSans are no longer supplied
directly by Debian.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28414 72102866-910b-0410-8b05-ffd578937521
and the window manager is not capable of displaying the document's
status (i.e., any window manager other than Window Maker for now).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27821 72102866-910b-0410-8b05-ffd578937521
Windows.
Adjust y coordinate of point in compositeGState:... for cairo. This
solves bug #24709.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27718 72102866-910b-0410-8b05-ffd578937521
mask. This fixes an issue where an application could be deactivated
under Window Maker when a submenu is closed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27623 72102866-910b-0410-8b05-ffd578937521