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
71d4b5fc
Commit
71d4b5fc
authored
Oct 07, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Optimize WM_LBUTTONUP handler.
parent
9e75962e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
monthcal.c
dlls/comctl32/monthcal.c
+9
-13
No files found.
dlls/comctl32/monthcal.c
View file @
71d4b5fc
/*
Month calendar control
/*
* Month calendar control
*
*
* Copyright 1998, 1999 Eric Kohl (ekohl@abo.rhein-zeitung.de)
* Copyright 1998, 1999 Eric Kohl (ekohl@abo.rhein-zeitung.de)
* Copyright 1999 Alex Priem (alexp@sci.kun.nl)
* Copyright 1999 Alex Priem (alexp@sci.kun.nl)
* Copyright 1999 Chris Morgan <cmorgan@wpi.edu> and
* Copyright 1999 Chris Morgan <cmorgan@wpi.edu> and
* James Abbatiello <abbeyj@wpi.edu>
* James Abbatiello <abbeyj@wpi.edu>
* Copyright 2000 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* Copyright 2000 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* Copyright 2009 Nikolay Sivov
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -1788,16 +1789,19 @@ static LRESULT
...
@@ -1788,16 +1789,19 @@ static LRESULT
MONTHCAL_LButtonUp
(
MONTHCAL_INFO
*
infoPtr
,
LPARAM
lParam
)
MONTHCAL_LButtonUp
(
MONTHCAL_INFO
*
infoPtr
,
LPARAM
lParam
)
{
{
NMHDR
nmhdr
;
NMHDR
nmhdr
;
BOOL
redraw
=
FALSE
;
MCHITTESTINFO
ht
;
MCHITTESTINFO
ht
;
DWORD
hit
;
DWORD
hit
;
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
if
(
infoPtr
->
status
&
(
MC_PREVPRESSED
|
MC_NEXTPRESSED
))
{
if
(
infoPtr
->
status
&
(
MC_PREVPRESSED
|
MC_NEXTPRESSED
))
{
RECT
*
r
;
KillTimer
(
infoPtr
->
hwndSelf
,
MC_PREVNEXTMONTHTIMER
);
KillTimer
(
infoPtr
->
hwndSelf
,
MC_PREVNEXTMONTHTIMER
);
r
=
infoPtr
->
status
&
MC_PREVPRESSED
?
&
infoPtr
->
titlebtnprev
:
&
infoPtr
->
titlebtnnext
;
infoPtr
->
status
&=
~
(
MC_PREVPRESSED
|
MC_NEXTPRESSED
);
infoPtr
->
status
&=
~
(
MC_PREVPRESSED
|
MC_NEXTPRESSED
);
redraw
=
TRUE
;
InvalidateRect
(
infoPtr
->
hwndSelf
,
r
,
FALSE
);
}
}
ReleaseCapture
();
ReleaseCapture
();
...
@@ -1818,9 +1822,7 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
...
@@ -1818,9 +1822,7 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
infoPtr
->
status
=
MC_SEL_LBUTUP
;
infoPtr
->
status
=
MC_SEL_LBUTUP
;
MONTHCAL_SetDayFocus
(
infoPtr
,
NULL
);
MONTHCAL_SetDayFocus
(
infoPtr
,
NULL
);
if
((
hit
==
MCHT_CALENDARDATENEXT
)
||
if
((
hit
&
MCHT_CALENDARDATE
)
==
MCHT_CALENDARDATE
)
(
hit
==
MCHT_CALENDARDATEPREV
)
||
(
hit
==
MCHT_CALENDARDATE
))
{
{
SYSTEMTIME
sel
=
infoPtr
->
curSel
;
SYSTEMTIME
sel
=
infoPtr
->
curSel
;
...
@@ -1839,14 +1841,8 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
...
@@ -1839,14 +1841,8 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
MONTHCAL_NotifySelectionChange
(
infoPtr
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
MONTHCAL_NotifySelect
(
infoPtr
);
MONTHCAL_NotifySelect
(
infoPtr
);
return
0
;
}
}
/* redraw if necessary */
if
(
redraw
)
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
return
0
;
return
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