aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-04-18 08:10:08 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-25 00:39:27 +0200
commit12130a4d9e41f37a1af9caaa95fb46fd284d03aa (patch)
tree63d3109b194210236b9e938b20fe86062c6ddb28 /nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
parenta648558796042b0cdb1a373f52bf8a4ca2dbea87 (diff)
downloadnx-libs-12130a4d9e41f37a1af9caaa95fb46fd284d03aa.tar.gz
nx-libs-12130a4d9e41f37a1af9caaa95fb46fd284d03aa.tar.bz2
nx-libs-12130a4d9e41f37a1af9caaa95fb46fd284d03aa.zip
hw/nxagent/NXglyphcurs.c: Shrink file, drop duplicate code that can identically be found in dix/glyphcurs.c.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c69
1 files changed, 1 insertions, 68 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
index 1696ae51f..33492a6d6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
@@ -64,20 +64,7 @@ SOFTWARE.
/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "misc.h"
-#include <X11/fonts/fontstruct.h>
-#include "dixfontstr.h"
-#include "scrnintstr.h"
-#include "gcstruct.h"
-#include "resource.h"
-#include "dix.h"
-#include "cursorstr.h"
-#include "opaque.h"
-#include "servermd.h"
+#include "../../dix/glyphcurs.c"
#include "../../fb/fb.h"
#include "Pixmaps.h"
@@ -183,57 +170,3 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
return Success;
}
-
-
-Bool
-CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
-{
- CharInfoPtr pci;
- unsigned long nglyphs;
- CARD8 chs[2];
- FontEncoding encoding;
-
- chs[0] = ch >> 8;
- chs[1] = ch;
- encoding = (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit;
- if (encoding == Linear16Bit)
- {
- if (ch < pfont->info.firstCol || pfont->info.lastCol < ch)
- return FALSE;
- }
- else
- {
- if (chs[0] < pfont->info.firstRow || pfont->info.lastRow < chs[0])
- return FALSE;
- if (chs[1] < pfont->info.firstCol || pfont->info.lastCol < chs[1])
- return FALSE;
- }
- (*pfont->get_glyphs) (pfont, 1, chs, encoding, &nglyphs, &pci);
- if (nglyphs == 0)
- return FALSE;
- cm->width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
- cm->height = pci->metrics.descent + pci->metrics.ascent;
- if (pci->metrics.leftSideBearing > 0)
- {
- cm->width += pci->metrics.leftSideBearing;
- cm->xhot = 0;
- }
- else
- {
- cm->xhot = -pci->metrics.leftSideBearing;
- if (pci->metrics.rightSideBearing < 0)
- cm->width -= pci->metrics.rightSideBearing;
- }
- if (pci->metrics.ascent < 0)
- {
- cm->height -= pci->metrics.ascent;
- cm->yhot = 0;
- }
- else
- {
- cm->yhot = pci->metrics.ascent;
- if (pci->metrics.descent < 0)
- cm->height -= pci->metrics.descent;
- }
- return TRUE;
-}