On an X set-up with multiple monitors running separate X screens (as
opposed to merging them into one large X screen using Xinerama), the
selected X visual needs to be one for the screen where the colormap,
window, and other X resources are created. In fact, all these need to
match, and the GL context as well.
Most of the SFML windowing and graphics code uses (X)DefaultScreen()
for that, which is fine. Combined with XOpenDisplay(NULL), this will
create the window on the screen (and monitor) selected by the DISPLAY
enviroment variable. :0.0 will be the first monitor, :0.1 the second,
etc.
However, XGetVisualInfo() will return visuals for *all* screens, not
just the default one. They seem to be ordered by screen number, but I
don't think the standard makes any guarantees there.
If the visual doesn't match up with the screen, this will abort with
an X error. BadMatch, in many cases.
This means that in addition to other filtering,
GlxContext::selectBestVisual() needs to filter the visuals by screen
number, otherwise SFML won't work at all on any screens but the first.
This fixes issue #724.
When mesa updated their headers, they changed the include guard
from __glxext_h_ to __glx_glxext_h_, which breaks compilation
due to conflicting declarations. This commit modifies the preprocessor
directives to allow for compilation with older and newer mesa header
versions.
Fixes: #1472
- remove Wait and SizeAll cursors as they don't look nice
(Wait is not spining and produces a broken rendering,
SizeAll is a simple white cursor.)
- fix memory management for NSCursor.
- ignore selector warnings.
* Removed duplicated CMake code
* Made it possible to manually specify the pkg-config path
* Install pkg-config files by default on Linux and BSD systems
Added 1 pixel padding for glyph uv's and increased glyph quads boundaries by 1 pixel so the glyphs aren't cropped when text is being scrolled with sub-pixel increments
Before this change, `sf::Font` always rendered/provided one character
per Unicode codepoint, even if that character wasn't represented by the
current font file or duplicated. This caused more texture space to be
used than necessary, which is especially apparent, when trying to render
a large amount of unhandled glyphs (the texture would literally fill up
with empty squares representing missing characters).
When applying an outline thickness to sf::Text in combination with a
strikethrough and/or an underlined style, the ensureGeometryUpdate
function adds unwanted vertices if the string contains two consecutive
'\n' charecter.
To fix this we need to add an additional check in the if statements to
check if both the current and previous character it's a new line
character.
Calling tell() and thus std::ftell() for every reading iteration ate up
80-90% of the whole read call. By manually tracking the current position
the calls to tell() can be safely removed.
vim interprets the # ex: comments as a modeline, which causes editing
this file with vim to throw an error.
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>