Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2496c08b
Commit
2496c08b
authored
Nov 21, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of a bunch of TSX functions.
parent
b539a571
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
153 additions
and
165 deletions
+153
-165
X11_calls
dlls/x11drv/X11_calls
+0
-37
clipboard.c
dlls/x11drv/clipboard.c
+3
-1
event.c
dlls/x11drv/event.c
+5
-6
keyboard.c
dlls/x11drv/keyboard.c
+6
-2
mouse.c
dlls/x11drv/mouse.c
+3
-1
ts_xlib.c
dlls/x11drv/ts_xlib.c
+0
-0
ts_xlib.h
dlls/x11drv/ts_xlib.h
+10
-47
window.c
dlls/x11drv/window.c
+3
-1
winpos.c
dlls/x11drv/winpos.c
+5
-2
x11ddraw.c
dlls/x11drv/x11ddraw.c
+16
-5
x11drv_main.c
dlls/x11drv/x11drv_main.c
+12
-8
bitmap.c
graphics/x11drv/bitmap.c
+6
-3
brush.c
graphics/x11drv/brush.c
+13
-9
clipping.c
graphics/x11drv/clipping.c
+3
-2
graphics.c
graphics/x11drv/graphics.c
+26
-17
palette.c
graphics/x11drv/palette.c
+34
-21
xfont.c
graphics/x11drv/xfont.c
+8
-3
No files found.
dlls/x11drv/X11_calls
View file @
2496c08b
...
@@ -4,77 +4,40 @@
...
@@ -4,77 +4,40 @@
# To add a new call, put it on this list and run tools/make_X11wrappers.
# To add a new call, put it on this list and run tools/make_X11wrappers.
# Also read the comments at the top of tools/make_X11wrappers.
# Also read the comments at the top of tools/make_X11wrappers.
#
#
XAllocColor
XAllocColorCells
XBell
XChangeGC
XChangeGC
XChangeProperty
XChangeProperty
XChangeWindowAttributes
XCopyArea
XCopyPlane
XCreateBitmapFromData
XCreateColormap
XCreatePixmap
XDefineCursor
XDeleteProperty
XDrawArc
XDrawArc
XDrawLine
XDrawLine
XDrawLines
XDrawLines
XDrawRectangle
XDrawString16
XDrawString16
XDrawText16
XDrawText16
XFillArc
XFillArc
XFillPolygon
XFillRectangle
XFillRectangle
XFlush
XFree
XFree
XFreeColormap
XFreeColors
XFreeFont
XFreeFont
XFreeFontNames
XFreePixmap
XFreePixmap
XGetAtomName
XGetAtomName
XGetFontProperty
XGetFontProperty
XGetGeometry
XGetGeometry
XGetImage
XGetScreenSaver
XGetSelectionOwner
XGetSelectionOwner
XGetWindowAttributes
XGetWindowProperty
XGetWindowProperty
XGrabPointer
XGrabServer
XInternAtom
XInternAtom
XKeycodeToKeysym
XKeycodeToKeysym
XKeysymToKeycode
XKeysymToKeycode
XKeysymToString
XKeysymToString
XListDepths
XListFonts
XLoadQueryFont
XMapWindow
XMapWindow
XOpenDisplay
XOpenIM
XQueryColor
XQueryColors
XQueryPointer
XQueryPointer
XQueryTree
XQueryTree
XReconfigureWMWindow
XRefreshKeyboardMapping
XSendEvent
XSetArcMode
XSetArcMode
XSetClipRectangles
XSetClipRectangles
XSetDashes
XSetDashes
XSetForeground
XSetForeground
XSetFunction
XSetFunction
XSetGraphicsExposures
XSetLineAttributes
XSetLineAttributes
XSetScreenSaver
XSetSelectionOwner
XSetSelectionOwner
XSetSubwindowMode
XSetSubwindowMode
XStoreColor
XStoreColor
XSync
XSync
XTextExtents16
XTextExtents16
XTextWidth16
XTextWidth16
XUngrabPointer
XUngrabServer
XUninstallColormap
XUnmapWindow
XUnmapWindow
dlls/x11drv/clipboard.c
View file @
2496c08b
...
@@ -1589,7 +1589,9 @@ static BOOL X11DRV_CLIPBOARD_ReadSelection(LPWINE_CLIPFORMAT lpData, Window w, A
...
@@ -1589,7 +1589,9 @@ static BOOL X11DRV_CLIPBOARD_ReadSelection(LPWINE_CLIPFORMAT lpData, Window w, A
/* Delete the property on the window now that we are done
/* Delete the property on the window now that we are done
* This will send a PropertyNotify event to the selection owner. */
* This will send a PropertyNotify event to the selection owner. */
TSXDeleteProperty
(
display
,
w
,
prop
);
wine_tsx11_lock
();
XDeleteProperty
(
display
,
w
,
prop
);
wine_tsx11_unlock
();
/* Free the retrieved property data */
/* Free the retrieved property data */
HeapFree
(
GetProcessHeap
(),
0
,
val
);
HeapFree
(
GetProcessHeap
(),
0
,
val
);
...
...
dlls/x11drv/event.c
View file @
2496c08b
...
@@ -852,11 +852,8 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO
...
@@ -852,11 +852,8 @@ static void EVENT_SelectionRequest( HWND hWnd, XSelectionRequestEvent *event, BO
}
}
else
else
{
{
if
(
TRACE_ON
(
clipboard
))
TRACE_
(
clipboard
)(
"Request for property %s (%ld) failed
\n
"
,
{
TSXGetAtomName
(
display
,
event
->
target
),
event
->
target
);
TRACE_
(
clipboard
)(
"Request for property %s (%ld) failed
\n
"
,
TSXGetAtomName
(
display
,
event
->
target
),
event
->
target
);
}
}
}
}
}
...
@@ -874,7 +871,9 @@ END:
...
@@ -874,7 +871,9 @@ END:
result
.
target
=
event
->
target
;
result
.
target
=
event
->
target
;
result
.
time
=
event
->
time
;
result
.
time
=
event
->
time
;
TRACE
(
"Sending SelectionNotify event...
\n
"
);
TRACE
(
"Sending SelectionNotify event...
\n
"
);
TSXSendEvent
(
display
,
event
->
requestor
,
False
,
NoEventMask
,(
XEvent
*
)
&
result
);
wine_tsx11_lock
();
XSendEvent
(
display
,
event
->
requestor
,
False
,
NoEventMask
,(
XEvent
*
)
&
result
);
wine_tsx11_unlock
();
}
}
}
}
...
...
dlls/x11drv/keyboard.c
View file @
2496c08b
...
@@ -1624,7 +1624,9 @@ void X11DRV_MappingNotify( XMappingEvent *event )
...
@@ -1624,7 +1624,9 @@ void X11DRV_MappingNotify( XMappingEvent *event )
{
{
HWND
hwnd
;
HWND
hwnd
;
TSXRefreshKeyboardMapping
(
event
);
wine_tsx11_lock
();
XRefreshKeyboardMapping
(
event
);
wine_tsx11_unlock
();
X11DRV_InitKeyboard
(
pKeyStateTable
);
X11DRV_InitKeyboard
(
pKeyStateTable
);
hwnd
=
GetFocus
();
hwnd
=
GetFocus
();
...
@@ -2196,5 +2198,7 @@ found:
...
@@ -2196,5 +2198,7 @@ found:
*/
*/
void
X11DRV_Beep
(
void
)
void
X11DRV_Beep
(
void
)
{
{
TSXBell
(
thread_display
(),
0
);
wine_tsx11_lock
();
XBell
(
thread_display
(),
0
);
wine_tsx11_unlock
();
}
}
dlls/x11drv/mouse.c
View file @
2496c08b
...
@@ -162,7 +162,9 @@ static void update_cursor( HWND hwnd, Window win )
...
@@ -162,7 +162,9 @@ static void update_cursor( HWND hwnd, Window win )
if
(
data
->
cursor_window
!=
win
)
if
(
data
->
cursor_window
!=
win
)
{
{
data
->
cursor_window
=
win
;
data
->
cursor_window
=
win
;
if
(
data
->
cursor
)
TSXDefineCursor
(
data
->
display
,
win
,
data
->
cursor
);
wine_tsx11_lock
();
if
(
data
->
cursor
)
XDefineCursor
(
data
->
display
,
win
,
data
->
cursor
);
wine_tsx11_unlock
();
}
}
}
}
...
...
dlls/x11drv/ts_xlib.c
View file @
2496c08b
This diff is collapsed.
Click to expand it.
dlls/x11drv/ts_xlib.h
View file @
2496c08b
...
@@ -19,80 +19,43 @@
...
@@ -19,80 +19,43 @@
extern
void
wine_tsx11_lock
(
void
);
extern
void
wine_tsx11_lock
(
void
);
extern
void
wine_tsx11_unlock
(
void
);
extern
void
wine_tsx11_unlock
(
void
);
extern
XFontStruct
*
TSXLoadQueryFont
(
Display
*
,
const
char
*
);
extern
XImage
*
TSXGetImage
(
Display
*
,
Drawable
,
int
,
int
,
unsigned
int
,
unsigned
int
,
unsigned
long
,
int
);
extern
Display
*
TSXOpenDisplay
(
const
char
*
);
extern
char
*
TSXGetAtomName
(
Display
*
,
Atom
);
extern
char
*
TSXGetAtomName
(
Display
*
,
Atom
);
extern
char
*
TSXKeysymToString
(
KeySym
);
extern
char
*
TSXKeysymToString
(
KeySym
);
extern
Atom
TSXInternAtom
(
Display
*
,
const
char
*
,
int
);
extern
Atom
TSXInternAtom
(
Display
*
,
const
char
*
,
int
);
extern
Colormap
TSXCreateColormap
(
Display
*
,
Window
,
Visual
*
,
int
);
extern
Pixmap
TSXCreatePixmap
(
Display
*
,
Drawable
,
unsigned
int
,
unsigned
int
,
unsigned
int
);
extern
Pixmap
TSXCreateBitmapFromData
(
Display
*
,
Drawable
,
const
char
*
,
unsigned
int
,
unsigned
int
);
extern
Window
TSXGetSelectionOwner
(
Display
*
,
Atom
);
extern
Window
TSXGetSelectionOwner
(
Display
*
,
Atom
);
extern
char
**
TSXListFonts
(
Display
*
,
const
char
*
,
int
,
int
*
);
extern
KeySym
TSXKeycodeToKeysym
(
Display
*
,
unsigned
int
,
int
);
extern
KeySym
TSXKeycodeToKeysym
(
Display
*
,
unsigned
int
,
int
);
extern
int
*
TSXListDepths
(
Display
*
,
int
,
int
*
);
extern
int
TSXReconfigureWMWindow
(
Display
*
,
Window
,
int
,
unsigned
int
,
XWindowChanges
*
);
extern
int
TSXAllocColor
(
Display
*
,
Colormap
,
XColor
*
);
extern
int
TSXAllocColorCells
(
Display
*
,
Colormap
,
int
,
unsigned
long
*
,
unsigned
int
,
unsigned
long
*
,
unsigned
int
);
extern
int
TSXBell
(
Display
*
,
int
);
extern
int
TSXChangeGC
(
Display
*
,
GC
,
unsigned
long
,
XGCValues
*
);
extern
int
TSXChangeGC
(
Display
*
,
GC
,
unsigned
long
,
XGCValues
*
);
extern
int
TSXChangeProperty
(
Display
*
,
Window
,
Atom
,
Atom
,
int
,
int
,
const
unsigned
char
*
,
int
);
extern
int
TSXChangeProperty
(
Display
*
,
Window
,
Atom
,
Atom
,
int
,
int
,
const
unsigned
char
*
,
int
);
extern
int
TSXChangeWindowAttributes
(
Display
*
,
Window
,
unsigned
long
,
XSetWindowAttributes
*
);
extern
int
TSXCopyArea
(
Display
*
,
Drawable
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
);
extern
int
TSXCopyPlane
(
Display
*
,
Drawable
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
,
unsigned
long
);
extern
int
TSXDefineCursor
(
Display
*
,
Window
,
Cursor
);
extern
int
TSXDeleteProperty
(
Display
*
,
Window
,
Atom
);
extern
int
TSXDrawArc
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
);
extern
int
TSXDrawArc
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
);
extern
int
TSXDrawLine
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
int
,
int
);
extern
int
TSXDrawLine
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
int
,
int
);
extern
int
TSXDrawLines
(
Display
*
,
Drawable
,
GC
,
XPoint
*
,
int
,
int
);
extern
int
TSXDrawLines
(
Display
*
,
Drawable
,
GC
,
XPoint
*
,
int
,
int
);
extern
int
TSXDrawRectangle
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
);
extern
int
TSXDrawString16
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
const
XChar2b
*
,
int
);
extern
int
TSXDrawString16
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
const
XChar2b
*
,
int
);
extern
int
TSXDrawText16
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
XTextItem16
*
,
int
);
extern
int
TSXDrawText16
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
XTextItem16
*
,
int
);
extern
int
TSXFillArc
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
);
extern
int
TSXFillArc
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
,
int
,
int
);
extern
int
TSXFillPolygon
(
Display
*
,
Drawable
,
GC
,
XPoint
*
,
int
,
int
,
int
);
extern
int
TSXFillRectangle
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
);
extern
int
TSXFillRectangle
(
Display
*
,
Drawable
,
GC
,
int
,
int
,
unsigned
int
,
unsigned
int
);
extern
int
TSXFlush
(
Display
*
);
extern
int
TSXFree
(
void
*
);
extern
int
TSXFree
(
void
*
);
extern
int
TSXFreeColormap
(
Display
*
,
Colormap
);
extern
int
TSXFreeColors
(
Display
*
,
Colormap
,
unsigned
long
*
,
int
,
unsigned
long
);
extern
int
TSXFreeFont
(
Display
*
,
XFontStruct
*
);
extern
int
TSXFreeFont
(
Display
*
,
XFontStruct
*
);
extern
int
TSXFreeFontNames
(
char
**
);
extern
int
TSXFreePixmap
(
Display
*
,
Pixmap
);
extern
int
TSXFreePixmap
(
Display
*
,
Pixmap
);
extern
int
TSXGetFontProperty
(
XFontStruct
*
,
Atom
,
unsigned
long
*
);
extern
int
TSXGetFontProperty
(
XFontStruct
*
,
Atom
,
unsigned
long
*
);
extern
int
TSXGetGeometry
(
Display
*
,
Drawable
,
Window
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
);
extern
int
TSXGetGeometry
(
Display
*
,
Drawable
,
Window
*
,
int
*
,
int
*
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
,
unsigned
int
*
);
extern
int
TSXGetScreenSaver
(
Display
*
,
int
*
,
int
*
,
int
*
,
int
*
);
extern
int
TSXGetWindowProperty
(
Display
*
,
Window
,
Atom
,
long
,
long
,
int
,
Atom
,
Atom
*
,
int
*
,
unsigned
long
*
,
unsigned
long
*
,
unsigned
char
**
);
extern
int
TSXGetWindowProperty
(
Display
*
,
Window
,
Atom
,
long
,
long
,
int
,
Atom
,
Atom
*
,
int
*
,
unsigned
long
*
,
unsigned
long
*
,
unsigned
char
**
);
extern
int
TSXGetWindowAttributes
(
Display
*
,
Window
,
XWindowAttributes
*
);
extern
int
TSXGrabPointer
(
Display
*
,
Window
,
int
,
unsigned
int
,
int
,
int
,
Window
,
Cursor
,
Time
);
extern
int
TSXGrabServer
(
Display
*
);
extern
KeyCode
TSXKeysymToKeycode
(
Display
*
,
KeySym
);
extern
KeyCode
TSXKeysymToKeycode
(
Display
*
,
KeySym
);
extern
int
TSXMapWindow
(
Display
*
,
Window
);
extern
int
TSXMapWindow
(
Display
*
,
Window
);
extern
int
TSXQueryColor
(
Display
*
,
Colormap
,
XColor
*
);
extern
int
TSXQueryPointer
(
Display
*
,
Window
,
Window
*
,
Window
*
,
int
*
,
int
*
,
int
*
,
int
*
,
unsigned
int
*
);
extern
int
TSXQueryColors
(
Display
*
,
Colormap
,
XColor
*
,
int
);
extern
int
TSXQueryTree
(
Display
*
,
Window
,
Window
*
,
Window
*
,
Window
**
,
unsigned
int
*
);
extern
int
TSXQueryPointer
(
Display
*
,
Window
,
Window
*
,
Window
*
,
int
*
,
int
*
,
int
*
,
int
*
,
unsigned
int
*
);
extern
int
TSXQueryTree
(
Display
*
,
Window
,
Window
*
,
Window
*
,
Window
**
,
unsigned
int
*
);
extern
int
TSXRefreshKeyboardMapping
(
XMappingEvent
*
);
extern
int
TSXSendEvent
(
Display
*
,
Window
,
int
,
long
,
XEvent
*
);
extern
int
TSXSetArcMode
(
Display
*
,
GC
,
int
);
extern
int
TSXSetArcMode
(
Display
*
,
GC
,
int
);
extern
int
TSXSetClipRectangles
(
Display
*
,
GC
,
int
,
int
,
XRectangle
*
,
int
,
int
);
extern
int
TSXSetClipRectangles
(
Display
*
,
GC
,
int
,
int
,
XRectangle
*
,
int
,
int
);
extern
int
TSXSetDashes
(
Display
*
,
GC
,
int
,
const
char
*
,
int
);
extern
int
TSXSetDashes
(
Display
*
,
GC
,
int
,
const
char
*
,
int
);
extern
int
TSXSetForeground
(
Display
*
,
GC
,
unsigned
long
);
extern
int
TSXSetForeground
(
Display
*
,
GC
,
unsigned
long
);
extern
int
TSXSetFunction
(
Display
*
,
GC
,
int
);
extern
int
TSXSetFunction
(
Display
*
,
GC
,
int
);
extern
int
TSXSetGraphicsExposures
(
Display
*
,
GC
,
int
);
extern
int
TSXSetLineAttributes
(
Display
*
,
GC
,
unsigned
int
,
int
,
int
,
int
);
extern
int
TSXSetLineAttributes
(
Display
*
,
GC
,
unsigned
int
,
int
,
int
,
int
);
extern
int
TSXSetScreenSaver
(
Display
*
,
int
,
int
,
int
,
int
);
extern
int
TSXSetSelectionOwner
(
Display
*
,
Atom
,
Window
,
Time
);
extern
int
TSXSetSelectionOwner
(
Display
*
,
Atom
,
Window
,
Time
);
extern
int
TSXSetSubwindowMode
(
Display
*
,
GC
,
int
);
extern
int
TSXSetSubwindowMode
(
Display
*
,
GC
,
int
);
extern
int
TSXStoreColor
(
Display
*
,
Colormap
,
XColor
*
);
extern
int
TSXStoreColor
(
Display
*
,
Colormap
,
XColor
*
);
extern
int
TSXSync
(
Display
*
,
int
);
extern
int
TSXSync
(
Display
*
,
int
);
extern
int
TSXTextExtents16
(
XFontStruct
*
,
const
XChar2b
*
,
int
,
int
*
,
int
*
,
int
*
,
XCharStruct
*
);
extern
int
TSXTextExtents16
(
XFontStruct
*
,
const
XChar2b
*
,
int
,
int
*
,
int
*
,
int
*
,
XCharStruct
*
);
extern
int
TSXTextWidth16
(
XFontStruct
*
,
const
XChar2b
*
,
int
);
extern
int
TSXTextWidth16
(
XFontStruct
*
,
const
XChar2b
*
,
int
);
extern
int
TSXUngrabPointer
(
Display
*
,
Time
);
extern
int
TSXUngrabServer
(
Display
*
);
extern
int
TSXUninstallColormap
(
Display
*
,
Colormap
);
extern
int
TSXUnmapWindow
(
Display
*
,
Window
);
extern
int
TSXUnmapWindow
(
Display
*
,
Window
);
extern
XIM
TSXOpenIM
(
Display
*
,
struct
_XrmHashBucketRec
*
,
char
*
,
char
*
);
#endif
/* defined(HAVE_X11_XLIB_H) */
#endif
/* defined(HAVE_X11_XLIB_H) */
...
...
dlls/x11drv/window.c
View file @
2496c08b
...
@@ -1256,8 +1256,10 @@ void X11DRV_SetFocus( HWND hwnd )
...
@@ -1256,8 +1256,10 @@ void X11DRV_SetFocus( HWND hwnd )
if
(
!
hwnd
)
/* If setting the focus to 0, uninstall the colormap */
if
(
!
hwnd
)
/* If setting the focus to 0, uninstall the colormap */
{
{
wine_tsx11_lock
();
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_PRIVATE
)
if
(
X11DRV_PALETTE_PaletteFlags
&
X11DRV_PALETTE_PRIVATE
)
TSXUninstallColormap
(
display
,
X11DRV_PALETTE_PaletteXColormap
);
XUninstallColormap
(
display
,
X11DRV_PALETTE_PaletteXColormap
);
wine_tsx11_unlock
();
return
;
return
;
}
}
...
...
dlls/x11drv/winpos.c
View file @
2496c08b
...
@@ -2205,8 +2205,11 @@ void X11DRV_ForceWindowRaise( HWND hwnd )
...
@@ -2205,8 +2205,11 @@ void X11DRV_ForceWindowRaise( HWND hwnd )
WND
*
ptr
=
WIN_FindWndPtr
(
list
[
i
]
);
WND
*
ptr
=
WIN_FindWndPtr
(
list
[
i
]
);
if
(
!
ptr
)
continue
;
if
(
!
ptr
)
continue
;
if
(
!
IsRectEmpty
(
&
ptr
->
rectWindow
)
&&
get_whole_window
(
ptr
))
if
(
!
IsRectEmpty
(
&
ptr
->
rectWindow
)
&&
get_whole_window
(
ptr
))
TSXReconfigureWMWindow
(
display
,
get_whole_window
(
ptr
),
0
,
{
CWStackMode
,
&
winChanges
);
wine_tsx11_lock
();
XReconfigureWMWindow
(
display
,
get_whole_window
(
ptr
),
0
,
CWStackMode
,
&
winChanges
);
wine_tsx11_unlock
();
}
WIN_ReleaseWndPtr
(
ptr
);
WIN_ReleaseWndPtr
(
ptr
);
}
}
}
}
...
...
dlls/x11drv/x11ddraw.c
View file @
2496c08b
...
@@ -83,11 +83,15 @@ static LRESULT WINAPI GrabWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
...
@@ -83,11 +83,15 @@ static LRESULT WINAPI GrabWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
win
=
root_window
;
win
=
root_window
;
}
}
TSXGrabPointer
(
display
,
win
,
True
,
0
,
GrabModeAsync
,
GrabModeAsync
,
win
,
None
,
CurrentTime
);
wine_tsx11_lock
();
XGrabPointer
(
display
,
win
,
True
,
0
,
GrabModeAsync
,
GrabModeAsync
,
win
,
None
,
CurrentTime
);
wine_tsx11_unlock
();
}
}
else
else
{
{
TSXUngrabPointer
(
display
,
CurrentTime
);
wine_tsx11_lock
();
XUngrabPointer
(
display
,
CurrentTime
);
wine_tsx11_unlock
();
}
}
return
0
;
return
0
;
...
@@ -212,7 +216,12 @@ static DDHAL_DDSURFACECALLBACKS hal_ddsurfcallbacks = {
...
@@ -212,7 +216,12 @@ static DDHAL_DDSURFACECALLBACKS hal_ddsurfcallbacks = {
static
DWORD
PASCAL
X11DRV_DDHAL_DestroyPalette
(
LPDDHAL_DESTROYPALETTEDATA
data
)
static
DWORD
PASCAL
X11DRV_DDHAL_DestroyPalette
(
LPDDHAL_DESTROYPALETTEDATA
data
)
{
{
Colormap
pal
=
data
->
lpDDPalette
->
u1
.
dwReserved1
;
Colormap
pal
=
data
->
lpDDPalette
->
u1
.
dwReserved1
;
if
(
pal
)
TSXFreeColormap
(
gdi_display
,
pal
);
if
(
pal
)
{
wine_tsx11_lock
();
XFreeColormap
(
gdi_display
,
pal
);
wine_tsx11_unlock
();
}
data
->
ddRVal
=
DD_OK
;
data
->
ddRVal
=
DD_OK
;
return
DDHAL_DRIVER_HANDLED
;
return
DDHAL_DRIVER_HANDLED
;
}
}
...
@@ -426,14 +435,16 @@ void X11DRV_DDHAL_SetPalEntries(Colormap pal, DWORD dwBase, DWORD dwNumEntries,
...
@@ -426,14 +435,16 @@ void X11DRV_DDHAL_SetPalEntries(Colormap pal, DWORD dwBase, DWORD dwNumEntries,
int
n
;
int
n
;
if
(
pal
)
{
if
(
pal
)
{
wine_tsx11_lock
();
c
.
flags
=
DoRed
|
DoGreen
|
DoBlue
;
c
.
flags
=
DoRed
|
DoGreen
|
DoBlue
;
c
.
pixel
=
dwBase
;
c
.
pixel
=
dwBase
;
for
(
n
=
0
;
n
<
dwNumEntries
;
n
++
,
c
.
pixel
++
)
{
for
(
n
=
0
;
n
<
dwNumEntries
;
n
++
,
c
.
pixel
++
)
{
c
.
red
=
lpEntries
[
n
].
peRed
<<
8
;
c
.
red
=
lpEntries
[
n
].
peRed
<<
8
;
c
.
green
=
lpEntries
[
n
].
peGreen
<<
8
;
c
.
green
=
lpEntries
[
n
].
peGreen
<<
8
;
c
.
blue
=
lpEntries
[
n
].
peBlue
<<
8
;
c
.
blue
=
lpEntries
[
n
].
peBlue
<<
8
;
TS
XStoreColor
(
gdi_display
,
pal
,
&
c
);
XStoreColor
(
gdi_display
,
pal
,
&
c
);
}
}
TSXFlush
(
gdi_display
);
/* update display immediately */
XFlush
(
gdi_display
);
/* update display immediately */
wine_tsx11_unlock
();
}
}
}
}
dlls/x11drv/x11drv_main.c
View file @
2496c08b
...
@@ -309,7 +309,7 @@ static void process_attach(void)
...
@@ -309,7 +309,7 @@ static void process_attach(void)
/* Open display */
/* Open display */
if
(
!
(
display
=
TS
XOpenDisplay
(
NULL
)))
if
(
!
(
display
=
XOpenDisplay
(
NULL
)))
{
{
MESSAGE
(
"x11drv: Can't open display: %s
\n
"
,
XDisplayName
(
NULL
)
);
MESSAGE
(
"x11drv: Can't open display: %s
\n
"
,
XDisplayName
(
NULL
)
);
ExitProcess
(
1
);
ExitProcess
(
1
);
...
@@ -325,10 +325,10 @@ static void process_attach(void)
...
@@ -325,10 +325,10 @@ static void process_attach(void)
if
(
screen_depth
)
/* depth specified */
if
(
screen_depth
)
/* depth specified */
{
{
int
depth_count
,
i
;
int
depth_count
,
i
;
int
*
depth_list
=
TS
XListDepths
(
display
,
DefaultScreen
(
display
),
&
depth_count
);
int
*
depth_list
=
XListDepths
(
display
,
DefaultScreen
(
display
),
&
depth_count
);
for
(
i
=
0
;
i
<
depth_count
;
i
++
)
for
(
i
=
0
;
i
<
depth_count
;
i
++
)
if
(
depth_list
[
i
]
==
screen_depth
)
break
;
if
(
depth_list
[
i
]
==
screen_depth
)
break
;
TS
XFree
(
depth_list
);
XFree
(
depth_list
);
if
(
i
>=
depth_count
)
if
(
i
>=
depth_count
)
{
{
MESSAGE
(
"x11drv: Depth %d not supported on this screen.
\n
"
,
screen_depth
);
MESSAGE
(
"x11drv: Depth %d not supported on this screen.
\n
"
,
screen_depth
);
...
@@ -508,7 +508,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
...
@@ -508,7 +508,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
BOOL
X11DRV_GetScreenSaveActive
(
void
)
BOOL
X11DRV_GetScreenSaveActive
(
void
)
{
{
int
timeout
,
temp
;
int
timeout
,
temp
;
TSXGetScreenSaver
(
gdi_display
,
&
timeout
,
&
temp
,
&
temp
,
&
temp
);
wine_tsx11_lock
();
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
temp
,
&
temp
,
&
temp
);
wine_tsx11_unlock
();
return
timeout
!=
0
;
return
timeout
!=
0
;
}
}
...
@@ -522,11 +524,13 @@ void X11DRV_SetScreenSaveActive(BOOL bActivate)
...
@@ -522,11 +524,13 @@ void X11DRV_SetScreenSaveActive(BOOL bActivate)
int
timeout
,
interval
,
prefer_blanking
,
allow_exposures
;
int
timeout
,
interval
,
prefer_blanking
,
allow_exposures
;
static
int
last_timeout
=
15
*
60
;
static
int
last_timeout
=
15
*
60
;
TSXGetScreenSaver
(
gdi_display
,
&
timeout
,
&
interval
,
&
prefer_blanking
,
wine_tsx11_lock
();
&
allow_exposures
);
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
interval
,
&
prefer_blanking
,
&
allow_exposures
);
if
(
timeout
)
last_timeout
=
timeout
;
if
(
timeout
)
last_timeout
=
timeout
;
timeout
=
bActivate
?
last_timeout
:
0
;
timeout
=
bActivate
?
last_timeout
:
0
;
TSXSetScreenSaver
(
gdi_display
,
timeout
,
interval
,
prefer_blanking
,
XSetScreenSaver
(
gdi_display
,
timeout
,
interval
,
prefer_blanking
,
allow_exposures
);
allow_exposures
);
wine_tsx11_unlock
();
}
}
graphics/x11drv/bitmap.c
View file @
2496c08b
...
@@ -145,9 +145,12 @@ BOOL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
...
@@ -145,9 +145,12 @@ BOOL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
bmp
->
bitmap
.
bmHeight
,
bmp
->
bitmap
.
bmBitsPixel
);
bmp
->
bitmap
.
bmHeight
,
bmp
->
bitmap
.
bmBitsPixel
);
/* Create the pixmap */
/* Create the pixmap */
if
(
!
(
bmp
->
physBitmap
=
(
void
*
)
TSXCreatePixmap
(
gdi_display
,
root_window
,
wine_tsx11_lock
();
bmp
->
bitmap
.
bmWidth
,
bmp
->
bitmap
.
bmHeight
,
bmp
->
physBitmap
=
(
void
*
)
XCreatePixmap
(
gdi_display
,
root_window
,
bmp
->
bitmap
.
bmBitsPixel
)))
bmp
->
bitmap
.
bmWidth
,
bmp
->
bitmap
.
bmHeight
,
bmp
->
bitmap
.
bmBitsPixel
);
wine_tsx11_unlock
();
if
(
!
bmp
->
physBitmap
)
{
{
WARN
(
"Can't create Pixmap
\n
"
);
WARN
(
"Can't create Pixmap
\n
"
);
GDI_ReleaseObj
(
hbitmap
);
GDI_ReleaseObj
(
hbitmap
);
...
...
graphics/x11drv/brush.c
View file @
2496c08b
...
@@ -185,21 +185,23 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
...
@@ -185,21 +185,23 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
if
(
!
bmp
->
physBitmap
)
goto
done
;
if
(
!
bmp
->
physBitmap
)
goto
done
;
wine_tsx11_lock
();
if
((
dc
->
bitsPerPixel
==
1
)
&&
(
bmp
->
bitmap
.
bmBitsPixel
!=
1
))
if
((
dc
->
bitsPerPixel
==
1
)
&&
(
bmp
->
bitmap
.
bmBitsPixel
!=
1
))
{
{
/* Special case: a color pattern on a monochrome DC */
/* Special case: a color pattern on a monochrome DC */
physDev
->
brush
.
pixmap
=
TS
XCreatePixmap
(
gdi_display
,
root_window
,
8
,
8
,
1
);
physDev
->
brush
.
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
8
,
8
,
1
);
/* FIXME: should probably convert to monochrome instead */
/* FIXME: should probably convert to monochrome instead */
TS
XCopyPlane
(
gdi_display
,
(
Pixmap
)
bmp
->
physBitmap
,
physDev
->
brush
.
pixmap
,
XCopyPlane
(
gdi_display
,
(
Pixmap
)
bmp
->
physBitmap
,
physDev
->
brush
.
pixmap
,
BITMAP_monoGC
,
0
,
0
,
8
,
8
,
0
,
0
,
1
);
BITMAP_monoGC
,
0
,
0
,
8
,
8
,
0
,
0
,
1
);
}
}
else
else
{
{
physDev
->
brush
.
pixmap
=
TS
XCreatePixmap
(
gdi_display
,
root_window
,
physDev
->
brush
.
pixmap
=
XCreatePixmap
(
gdi_display
,
root_window
,
8
,
8
,
bmp
->
bitmap
.
bmBitsPixel
);
8
,
8
,
bmp
->
bitmap
.
bmBitsPixel
);
TS
XCopyArea
(
gdi_display
,
(
Pixmap
)
bmp
->
physBitmap
,
physDev
->
brush
.
pixmap
,
XCopyArea
(
gdi_display
,
(
Pixmap
)
bmp
->
physBitmap
,
physDev
->
brush
.
pixmap
,
BITMAP_GC
(
bmp
),
0
,
0
,
8
,
8
,
0
,
0
);
BITMAP_GC
(
bmp
),
0
,
0
,
8
,
8
,
0
,
0
);
}
}
wine_tsx11_unlock
();
if
(
bmp
->
bitmap
.
bmBitsPixel
>
1
)
if
(
bmp
->
bitmap
.
bmBitsPixel
>
1
)
{
{
...
@@ -254,8 +256,10 @@ HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
...
@@ -254,8 +256,10 @@ HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
case
BS_HATCHED
:
case
BS_HATCHED
:
TRACE
(
"BS_HATCHED
\n
"
);
TRACE
(
"BS_HATCHED
\n
"
);
physDev
->
brush
.
pixel
=
X11DRV_PALETTE_ToPhysical
(
physDev
,
logbrush
.
lbColor
);
physDev
->
brush
.
pixel
=
X11DRV_PALETTE_ToPhysical
(
physDev
,
logbrush
.
lbColor
);
physDev
->
brush
.
pixmap
=
TSXCreateBitmapFromData
(
gdi_display
,
root_window
,
wine_tsx11_lock
();
HatchBrushes
[
logbrush
.
lbHatch
],
8
,
8
);
physDev
->
brush
.
pixmap
=
XCreateBitmapFromData
(
gdi_display
,
root_window
,
HatchBrushes
[
logbrush
.
lbHatch
],
8
,
8
);
wine_tsx11_unlock
();
physDev
->
brush
.
fillStyle
=
FillStippled
;
physDev
->
brush
.
fillStyle
=
FillStippled
;
break
;
break
;
...
...
graphics/x11drv/clipping.c
View file @
2496c08b
...
@@ -159,7 +159,9 @@ void X11DRV_StartGraphicsExposures( HDC hdc )
...
@@ -159,7 +159,9 @@ void X11DRV_StartGraphicsExposures( HDC hdc )
if
(
dc
)
if
(
dc
)
{
{
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
TSXSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
True
);
wine_tsx11_lock
();
XSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
True
);
wine_tsx11_unlock
();
physDev
->
exposures
=
0
;
physDev
->
exposures
=
0
;
GDI_ReleaseObj
(
hdc
);
GDI_ReleaseObj
(
hdc
);
}
}
...
@@ -186,7 +188,6 @@ void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn )
...
@@ -186,7 +188,6 @@ void X11DRV_EndGraphicsExposures( HDC hdc, HRGN hrgn )
XSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
False
);
XSetGraphicsExposures
(
gdi_display
,
physDev
->
gc
,
False
);
if
(
physDev
->
exposures
)
if
(
physDev
->
exposures
)
{
{
XSync
(
gdi_display
,
False
);
for
(;;)
for
(;;)
{
{
XWindowEvent
(
gdi_display
,
physDev
->
drawable
,
~
0
,
&
event
);
XWindowEvent
(
gdi_display
,
physDev
->
drawable
,
~
0
,
&
event
);
...
...
graphics/x11drv/graphics.c
View file @
2496c08b
...
@@ -625,18 +625,22 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
...
@@ -625,18 +625,22 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
{
{
if
(
X11DRV_SetupGCForBrush
(
physDev
))
if
(
X11DRV_SetupGCForBrush
(
physDev
))
{
{
TSXFillRectangle
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
wine_tsx11_lock
();
physDev
->
org
.
x
+
rc
.
left
+
(
width
+
1
)
/
2
,
XFillRectangle
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
physDev
->
org
.
y
+
rc
.
top
+
(
width
+
1
)
/
2
,
physDev
->
org
.
x
+
rc
.
left
+
(
width
+
1
)
/
2
,
rc
.
right
-
rc
.
left
-
width
-
1
,
rc
.
bottom
-
rc
.
top
-
width
-
1
);
physDev
->
org
.
y
+
rc
.
top
+
(
width
+
1
)
/
2
,
rc
.
right
-
rc
.
left
-
width
-
1
,
rc
.
bottom
-
rc
.
top
-
width
-
1
);
wine_tsx11_unlock
();
update
=
TRUE
;
update
=
TRUE
;
}
}
}
}
if
(
X11DRV_SetupGCForPen
(
physDev
))
if
(
X11DRV_SetupGCForPen
(
physDev
))
{
{
TSXDrawRectangle
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
wine_tsx11_lock
();
physDev
->
org
.
x
+
rc
.
left
,
physDev
->
org
.
y
+
rc
.
top
,
XDrawRectangle
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
rc
.
right
-
rc
.
left
-
1
,
rc
.
bottom
-
rc
.
top
-
1
);
physDev
->
org
.
x
+
rc
.
left
,
physDev
->
org
.
y
+
rc
.
top
,
rc
.
right
-
rc
.
left
-
1
,
rc
.
bottom
-
rc
.
top
-
1
);
wine_tsx11_unlock
();
update
=
TRUE
;
update
=
TRUE
;
}
}
...
@@ -1038,14 +1042,18 @@ X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
...
@@ -1038,14 +1042,18 @@ X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
if
(
X11DRV_SetupGCForBrush
(
physDev
))
if
(
X11DRV_SetupGCForBrush
(
physDev
))
{
{
TSXFillPolygon
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
wine_tsx11_lock
();
points
,
count
+
1
,
Complex
,
CoordModeOrigin
);
XFillPolygon
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
points
,
count
+
1
,
Complex
,
CoordModeOrigin
);
wine_tsx11_unlock
();
update
=
TRUE
;
update
=
TRUE
;
}
}
if
(
X11DRV_SetupGCForPen
(
physDev
))
if
(
X11DRV_SetupGCForPen
(
physDev
))
{
{
TSXDrawLines
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
wine_tsx11_lock
();
points
,
count
+
1
,
CoordModeOrigin
);
XDrawLines
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
points
,
count
+
1
,
CoordModeOrigin
);
wine_tsx11_unlock
();
update
=
TRUE
;
update
=
TRUE
;
}
}
...
@@ -1240,12 +1248,13 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
...
@@ -1240,12 +1248,13 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
if
(
!
PtVisible
(
physDev
->
hdc
,
x
,
y
))
return
FALSE
;
if
(
!
PtVisible
(
physDev
->
hdc
,
x
,
y
))
return
FALSE
;
if
(
GetRgnBox
(
dc
->
hGCClipRgn
,
&
rect
)
==
ERROR
)
return
FALSE
;
if
(
GetRgnBox
(
dc
->
hGCClipRgn
,
&
rect
)
==
ERROR
)
return
FALSE
;
if
(
!
(
image
=
TSXGetImage
(
gdi_display
,
physDev
->
drawable
,
wine_tsx11_lock
();
physDev
->
org
.
x
+
rect
.
left
,
image
=
XGetImage
(
gdi_display
,
physDev
->
drawable
,
physDev
->
org
.
y
+
rect
.
top
,
physDev
->
org
.
x
+
rect
.
left
,
physDev
->
org
.
y
+
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
rect
.
bottom
-
rect
.
top
,
AllPlanes
,
ZPixmap
);
AllPlanes
,
ZPixmap
)))
return
FALSE
;
wine_tsx11_unlock
();
if
(
!
image
)
return
FALSE
;
if
(
X11DRV_SetupGCForBrush
(
physDev
))
if
(
X11DRV_SetupGCForBrush
(
physDev
))
{
{
...
...
graphics/x11drv/palette.c
View file @
2496c08b
...
@@ -152,12 +152,13 @@ int X11DRV_PALETTE_Init(void)
...
@@ -152,12 +152,13 @@ int X11DRV_PALETTE_Init(void)
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
}
}
wine_tsx11_lock
();
if
(
private_color_map
)
if
(
private_color_map
)
{
{
XSetWindowAttributes
win_attr
;
XSetWindowAttributes
win_attr
;
X11DRV_PALETTE_PaletteXColormap
=
TS
XCreateColormap
(
gdi_display
,
root_window
,
X11DRV_PALETTE_PaletteXColormap
=
XCreateColormap
(
gdi_display
,
root_window
,
visual
,
AllocAll
);
visual
,
AllocAll
);
if
(
X11DRV_PALETTE_PaletteXColormap
)
if
(
X11DRV_PALETTE_PaletteXColormap
)
{
{
X11DRV_PALETTE_PaletteFlags
|=
(
X11DRV_PALETTE_PRIVATE
|
X11DRV_PALETTE_WHITESET
);
X11DRV_PALETTE_PaletteFlags
|=
(
X11DRV_PALETTE_PRIVATE
|
X11DRV_PALETTE_WHITESET
);
...
@@ -169,21 +170,24 @@ int X11DRV_PALETTE_Init(void)
...
@@ -169,21 +170,24 @@ int X11DRV_PALETTE_Init(void)
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
)
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
)
{
{
win_attr
.
colormap
=
X11DRV_PALETTE_PaletteXColormap
;
win_attr
.
colormap
=
X11DRV_PALETTE_PaletteXColormap
;
TS
XChangeWindowAttributes
(
gdi_display
,
root_window
,
CWColormap
,
&
win_attr
);
XChangeWindowAttributes
(
gdi_display
,
root_window
,
CWColormap
,
&
win_attr
);
}
}
break
;
break
;
}
}
}
}
X11DRV_PALETTE_PaletteXColormap
=
TSXCreateColormap
(
gdi_display
,
root_window
,
X11DRV_PALETTE_PaletteXColormap
=
XCreateColormap
(
gdi_display
,
root_window
,
visual
,
AllocNone
);
visual
,
AllocNone
);
wine_tsx11_unlock
();
break
;
break
;
}
}
case
StaticGray
:
case
StaticGray
:
X11DRV_PALETTE_PaletteXColormap
=
TSXCreateColormap
(
gdi_display
,
root_window
,
wine_tsx11_lock
();
visual
,
AllocNone
);
X11DRV_PALETTE_PaletteXColormap
=
XCreateColormap
(
gdi_display
,
root_window
,
visual
,
AllocNone
);
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_FIXED
;
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_FIXED
;
X11DRV_PALETTE_Graymax
=
(
1
<<
screen_depth
)
-
1
;
X11DRV_PALETTE_Graymax
=
(
1
<<
screen_depth
)
-
1
;
wine_tsx11_unlock
();
break
;
break
;
case
TrueColor
:
case
TrueColor
:
...
@@ -193,24 +197,27 @@ int X11DRV_PALETTE_Init(void)
...
@@ -193,24 +197,27 @@ int X11DRV_PALETTE_Init(void)
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
/* FIXME: hack to detect XFree32 XF_VGA16 ... We just have
* depths 1 and 4
* depths 1 and 4
*/
*/
depths
=
TSXListDepths
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
nrofdepths
);
wine_tsx11_lock
();
depths
=
XListDepths
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
nrofdepths
);
if
((
nrofdepths
==
2
)
&&
((
depths
[
0
]
==
4
)
||
depths
[
1
]
==
4
))
{
if
((
nrofdepths
==
2
)
&&
((
depths
[
0
]
==
4
)
||
depths
[
1
]
==
4
))
{
monoPlane
=
1
;
monoPlane
=
1
;
for
(
white
=
palette_size
-
1
;
!
(
white
&
1
);
white
>>=
1
)
for
(
white
=
palette_size
-
1
;
!
(
white
&
1
);
white
>>=
1
)
monoPlane
++
;
monoPlane
++
;
X11DRV_PALETTE_PaletteFlags
=
(
white
&
mask
)
?
X11DRV_PALETTE_WHITESET
:
0
;
X11DRV_PALETTE_PaletteFlags
=
(
white
&
mask
)
?
X11DRV_PALETTE_WHITESET
:
0
;
X11DRV_PALETTE_PaletteXColormap
=
TSXCreateColormap
(
gdi_display
,
root_window
,
X11DRV_PALETTE_PaletteXColormap
=
XCreateColormap
(
gdi_display
,
root_window
,
visual
,
AllocNone
);
visual
,
AllocNone
);
TSXFree
(
depths
);
break
;
}
}
TSXFree
(
depths
);
else
X11DRV_PALETTE_PaletteXColormap
=
TSXCreateColormap
(
gdi_display
,
root_window
,
{
visual
,
AllocNone
);
X11DRV_PALETTE_PaletteXColormap
=
XCreateColormap
(
gdi_display
,
root_window
,
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_FIXED
;
visual
,
AllocNone
);
X11DRV_PALETTE_ComputeShifts
(
visual
->
red_mask
,
&
X11DRV_PALETTE_PRed
,
&
X11DRV_PALETTE_LRed
);
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_FIXED
;
X11DRV_PALETTE_ComputeShifts
(
visual
->
green_mask
,
&
X11DRV_PALETTE_PGreen
,
&
X11DRV_PALETTE_LGreen
);
X11DRV_PALETTE_ComputeShifts
(
visual
->
red_mask
,
&
X11DRV_PALETTE_PRed
,
&
X11DRV_PALETTE_LRed
);
X11DRV_PALETTE_ComputeShifts
(
visual
->
blue_mask
,
&
X11DRV_PALETTE_PBlue
,
&
X11DRV_PALETTE_LBlue
);
X11DRV_PALETTE_ComputeShifts
(
visual
->
green_mask
,
&
X11DRV_PALETTE_PGreen
,
&
X11DRV_PALETTE_LGreen
);
X11DRV_PALETTE_ComputeShifts
(
visual
->
blue_mask
,
&
X11DRV_PALETTE_PBlue
,
&
X11DRV_PALETTE_LBlue
);
}
XFree
(
depths
);
wine_tsx11_unlock
();
break
;
break
;
}
}
}
}
...
@@ -250,9 +257,13 @@ int X11DRV_PALETTE_Init(void)
...
@@ -250,9 +257,13 @@ int X11DRV_PALETTE_Init(void)
void
X11DRV_PALETTE_Cleanup
(
void
)
void
X11DRV_PALETTE_Cleanup
(
void
)
{
{
if
(
COLOR_gapFilled
)
if
(
COLOR_gapFilled
)
TSXFreeColors
(
gdi_display
,
X11DRV_PALETTE_PaletteXColormap
,
{
wine_tsx11_lock
();
XFreeColors
(
gdi_display
,
X11DRV_PALETTE_PaletteXColormap
,
(
unsigned
long
*
)(
X11DRV_PALETTE_PaletteToXPixel
+
COLOR_gapStart
),
(
unsigned
long
*
)(
X11DRV_PALETTE_PaletteToXPixel
+
COLOR_gapStart
),
COLOR_gapFilled
,
0
);
COLOR_gapFilled
,
0
);
wine_tsx11_unlock
();
}
}
}
/***********************************************************************
/***********************************************************************
...
@@ -796,8 +807,10 @@ COLORREF X11DRV_PALETTE_ToLogical(int pixel)
...
@@ -796,8 +807,10 @@ COLORREF X11DRV_PALETTE_ToLogical(int pixel)
((
X11DRV_PALETTE_XPixelToPalette
)
?
X11DRV_PALETTE_XPixelToPalette
[
pixel
]
:
pixel
))
)
&
0x00ffffff
;
((
X11DRV_PALETTE_XPixelToPalette
)
?
X11DRV_PALETTE_XPixelToPalette
[
pixel
]
:
pixel
))
)
&
0x00ffffff
;
}
}
wine_tsx11_lock
();
color
.
pixel
=
pixel
;
color
.
pixel
=
pixel
;
TSXQueryColor
(
gdi_display
,
X11DRV_PALETTE_PaletteXColormap
,
&
color
);
XQueryColor
(
gdi_display
,
X11DRV_PALETTE_PaletteXColormap
,
&
color
);
wine_tsx11_unlock
();
return
RGB
(
color
.
red
>>
8
,
color
.
green
>>
8
,
color
.
blue
>>
8
);
return
RGB
(
color
.
red
>>
8
,
color
.
green
>>
8
,
color
.
blue
>>
8
);
}
}
...
...
graphics/x11drv/xfont.c
View file @
2496c08b
...
@@ -2928,7 +2928,9 @@ void X11DRV_FONT_InitX11Metrics( void )
...
@@ -2928,7 +2928,9 @@ void X11DRV_FONT_InitX11Metrics( void )
HKEY
hkey
;
HKEY
hkey
;
x_pattern
=
TSXListFonts
(
gdi_display
,
"*"
,
MAX_FONTS
,
&
x_count
);
wine_tsx11_lock
();
x_pattern
=
XListFonts
(
gdi_display
,
"*"
,
MAX_FONTS
,
&
x_count
);
wine_tsx11_unlock
();
TRACE
(
"Font Mapper: initializing %i x11 fonts
\n
"
,
x_count
);
TRACE
(
"Font Mapper: initializing %i x11 fonts
\n
"
,
x_count
);
if
(
x_count
==
MAX_FONTS
)
if
(
x_count
==
MAX_FONTS
)
...
@@ -2988,7 +2990,8 @@ void X11DRV_FONT_InitX11Metrics( void )
...
@@ -2988,7 +2990,8 @@ void X11DRV_FONT_InitX11Metrics( void )
}
}
}
}
TSXFreeFontNames
(
x_pattern
);
wine_tsx11_lock
();
XFreeFontNames
(
x_pattern
);
/* check if we're dealing with X11 R6 server */
/* check if we're dealing with X11 R6 server */
{
{
...
@@ -2997,9 +3000,11 @@ void X11DRV_FONT_InitX11Metrics( void )
...
@@ -2997,9 +3000,11 @@ void X11DRV_FONT_InitX11Metrics( void )
if
(
(
x_fs
=
safe_XLoadQueryFont
(
gdi_display
,
buffer
))
)
if
(
(
x_fs
=
safe_XLoadQueryFont
(
gdi_display
,
buffer
))
)
{
{
text_caps
|=
TC_SF_X_YINDEP
;
text_caps
|=
TC_SF_X_YINDEP
;
TS
XFreeFont
(
gdi_display
,
x_fs
);
XFreeFont
(
gdi_display
,
x_fs
);
}
}
}
}
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
XFONT_WindowsNames
();
XFONT_WindowsNames
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment