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
8085b6cc
Commit
8085b6cc
authored
Mar 13, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
Mar 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reimplemented DrawFocusRect without using X11.
parent
f83cf69b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
30 deletions
+11
-30
painting.c
graphics/painting.c
+11
-30
No files found.
graphics/painting.c
View file @
8085b6cc
...
@@ -5,11 +5,6 @@
...
@@ -5,11 +5,6 @@
* Copyright 1997 Bertho A. Stultiens
* Copyright 1997 Bertho A. Stultiens
*/
*/
#include <X11/Intrinsic.h>
#include "ts_xlib.h"
#include "ts_xutil.h"
#include "x11drv.h"
#include <stdlib.h>
#include <stdlib.h>
#include "dc.h"
#include "dc.h"
#include "bitmap.h"
#include "bitmap.h"
...
@@ -20,6 +15,8 @@
...
@@ -20,6 +15,8 @@
#include "path.h"
#include "path.h"
#include "debug.h"
#include "debug.h"
#include "winerror.h"
#include "winerror.h"
#include "winuser.h"
#include "wine/winuser16.h"
/***********************************************************************
/***********************************************************************
...
@@ -654,10 +651,9 @@ void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
...
@@ -654,10 +651,9 @@ void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
*/
*/
BOOL
WINAPI
DrawFocusRect
(
HDC
hdc
,
const
RECT
*
rc
)
BOOL
WINAPI
DrawFocusRect
(
HDC
hdc
,
const
RECT
*
rc
)
{
{
HPEN
hOldPen
,
hnewPen
;
HBRUSH
hOldBrush
;
HPEN
hOldPen
,
hNewPen
;
INT
oldDrawMode
,
oldBkMode
;
INT
oldDrawMode
,
oldBkMode
;
INT
left
,
top
,
right
,
bottom
;
X11DRV_PDEVICE
*
physDev
;
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
!
dc
)
if
(
!
dc
)
...
@@ -665,36 +661,21 @@ BOOL WINAPI DrawFocusRect( HDC hdc, const RECT* rc )
...
@@ -665,36 +661,21 @@ BOOL WINAPI DrawFocusRect( HDC hdc, const RECT* rc )
SetLastError
(
ERROR_INVALID_HANDLE
);
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
return
FALSE
;
}
}
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
left
=
XLPTODP
(
dc
,
rc
->
left
);
top
=
YLPTODP
(
dc
,
rc
->
top
);
right
=
XLPTODP
(
dc
,
rc
->
right
);
bottom
=
YLPTODP
(
dc
,
rc
->
bottom
);
if
(
left
==
right
||
top
==
bottom
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
hnewPen
=
CreatePen
(
PS_DOT
,
1
,
GetSysColor
(
COLOR_WINDOWTEXT
)
);
hOldBrush
=
SelectObject
(
hdc
,
GetStockObject
(
NULL_BRUSH
));
hOldPen
=
SelectObject
(
hdc
,
hnewPen
);
hNewPen
=
CreatePen
(
PS_DOT
,
1
,
GetSysColor
(
COLOR_WINDOWTEXT
));
hOldPen
=
SelectObject
(
hdc
,
hNewPen
);
oldDrawMode
=
SetROP2
(
hdc
,
R2_XORPEN
);
oldDrawMode
=
SetROP2
(
hdc
,
R2_XORPEN
);
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
oldBkMode
=
SetBkMode
(
hdc
,
TRANSPARENT
);
/* Hack: make sure the XORPEN operation has an effect */
Rectangle
(
hdc
,
rc
->
left
,
rc
->
top
,
rc
->
right
,
rc
->
bottom
);
physDev
->
pen
.
pixel
=
(
1
<<
MONITOR_GetDepth
(
&
MONITOR_PrimaryMonitor
))
-
1
;
if
(
X11DRV_SetupGCForPen
(
dc
))
TSXDrawRectangle
(
display
,
physDev
->
drawable
,
physDev
->
gc
,
dc
->
w
.
DCOrgX
+
left
,
dc
->
w
.
DCOrgY
+
top
,
right
-
left
-
1
,
bottom
-
top
-
1
);
SetBkMode
(
hdc
,
oldBkMode
);
SetBkMode
(
hdc
,
oldBkMode
);
SetROP2
(
hdc
,
oldDrawMode
);
SetROP2
(
hdc
,
oldDrawMode
);
SelectObject
(
hdc
,
hOldPen
);
SelectObject
(
hdc
,
hOldPen
);
DeleteObject
(
hnewPen
);
DeleteObject
(
hNewPen
);
SelectObject
(
hdc
,
hOldBrush
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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