Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
61b15de4
Commit
61b15de4
authored
Sep 27, 1999
by
Rein Klazes
Committed by
Alexandre Julliard
Sep 27, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use an extra bit in the button status byte to flag whether the
DefButtonWndProc should process the WM_LBUTTONUP message.
parent
3d06d20b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
button.c
controls/button.c
+16
-4
button.h
include/button.h
+5
-0
No files found.
controls/button.c
View file @
61b15de4
...
@@ -140,7 +140,7 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
...
@@ -140,7 +140,7 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
if
(
wndPtr
->
dwStyle
&
BS_NOTIFY
||
if
(
wndPtr
->
dwStyle
&
BS_NOTIFY
||
style
==
BS_RADIOBUTTON
||
style
==
BS_RADIOBUTTON
||
style
==
BS_USERBUTTON
||
style
==
BS_USERBUTTON
||
style
==
BS_OWNERDRAW
)
{
style
==
BS_OWNERDRAW
)
{
SendMessageA
(
GetParent
(
hWnd
),
WM_COMMAND
,
SendMessageA
(
GetParent
(
hWnd
),
WM_COMMAND
,
MAKEWPARAM
(
wndPtr
->
wIDmenu
,
BN_DOUBLECLICKED
),
hWnd
);
MAKEWPARAM
(
wndPtr
->
wIDmenu
,
BN_DOUBLECLICKED
),
hWnd
);
break
;
break
;
...
@@ -150,14 +150,18 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
...
@@ -150,14 +150,18 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
SetCapture
(
hWnd
);
SetCapture
(
hWnd
);
SetFocus
(
hWnd
);
SetFocus
(
hWnd
);
SendMessageA
(
hWnd
,
BM_SETSTATE
,
TRUE
,
0
);
SendMessageA
(
hWnd
,
BM_SETSTATE
,
TRUE
,
0
);
infoPtr
->
state
|=
BUTTON_BTNPRESSED
;
break
;
break
;
case
WM_LBUTTONUP
:
case
WM_LBUTTONUP
:
/* FIXME: real windows uses extra flags in the status for this */
if
(
!
(
infoPtr
->
state
&
BUTTON_BTNPRESSED
))
break
;
if
(
GetCapture
()
!=
hWnd
)
break
;
infoPtr
->
state
&=
BUTTON_NSTATES
;
if
(
!
(
infoPtr
->
state
&
BUTTON_HIGHLIGHTED
))
{
ReleaseCapture
();
ReleaseCapture
();
if
(
!
(
infoPtr
->
state
&
BUTTON_HIGHLIGHTED
))
break
;
break
;
}
SendMessageA
(
hWnd
,
BM_SETSTATE
,
FALSE
,
0
);
SendMessageA
(
hWnd
,
BM_SETSTATE
,
FALSE
,
0
);
ReleaseCapture
();
GetClientRect
(
hWnd
,
&
rect
);
GetClientRect
(
hWnd
,
&
rect
);
if
(
PtInRect
(
&
rect
,
pt
))
if
(
PtInRect
(
&
rect
,
pt
))
{
{
...
@@ -181,6 +185,14 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
...
@@ -181,6 +185,14 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
}
}
break
;
break
;
case
WM_CAPTURECHANGED
:
if
(
infoPtr
->
state
&
BUTTON_BTNPRESSED
)
{
infoPtr
->
state
&=
BUTTON_NSTATES
;
if
(
infoPtr
->
state
&
BUTTON_HIGHLIGHTED
)
SendMessageA
(
hWnd
,
BM_SETSTATE
,
FALSE
,
0
);
}
break
;
case
WM_MOUSEMOVE
:
case
WM_MOUSEMOVE
:
if
(
GetCapture
()
==
hWnd
)
if
(
GetCapture
()
==
hWnd
)
{
{
...
...
include/button.h
View file @
61b15de4
...
@@ -26,6 +26,11 @@ typedef struct
...
@@ -26,6 +26,11 @@ typedef struct
#define BUTTON_3STATE 0x02
#define BUTTON_3STATE 0x02
#define BUTTON_HIGHLIGHTED 0x04
#define BUTTON_HIGHLIGHTED 0x04
#define BUTTON_HASFOCUS 0x08
#define BUTTON_HASFOCUS 0x08
#define BUTTON_NSTATES 0x0F
/* undocumented flags */
#define BUTTON_BTNPRESSED 0x40
#define BUTTON_UNKNOWN2 0x20
#define BUTTON_UNKNOWN3 0x10
#define BUTTON_STATE(hwnd) ((WIN_FindWndPtr(hwnd))->wExtra[0])
#define BUTTON_STATE(hwnd) ((WIN_FindWndPtr(hwnd))->wExtra[0])
...
...
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