narzoul
2d30ff6f94
Fixed GDI clipping issues
2016-04-03 20:36:21 +02:00
narzoul
c78c7c927f
Aligned usage of flip between compat and real primary surface chains
...
Using flip for direct front buffer updates can cause performance problems
if the driver forces vertical sync and overrides the DDFLIP_NOVSYNC flag.
On the other hand, DDFLIP_NOVSYNC flip requests on the compat primary
surface should be handled via real flip to allow vertical sync override.
2016-04-03 20:35:59 +02:00
narzoul
be67dff295
Avoid unnecessary palette updates
2016-04-03 13:06:04 +02:00
narzoul
9aa22534ab
Fixed crash due to setting clipper on uninitialized palette converter
2016-04-03 11:15:21 +02:00
narzoul
607eb5e25b
Simplified caret handling and fixed positioning issues
2016-04-02 23:24:25 +02:00
narzoul
fd1063defe
Default paint handlers for Edit and ListBox controls
...
Missing WM_NCPAINT handler for ListBox was causing the non-client area
to display incorrectly. Now the same handler is used as for DefWindowProc.
2016-04-02 01:00:00 +02:00
narzoul
3827007c0c
Avoid forced invalidation of the scroll bar child control when scrolling
...
This was causing the scroll bar arrows to lose their pressed appearance.
2016-03-31 23:06:18 +02:00
narzoul
d0fbd5cfd0
Fixed another GDI deadlock
...
Scenario:
Thread #1 enters the DirectDraw critical section
Thread #2 enters the GDI critical section
Thread #2 starts waiting on the DirectDraw critical section
Thread #1 starts waiting on the GDI critical section
Solution:
If the primary surface has not been locked yet, enter the DirectDraw critical
section before entering the GDI critical section.
2016-03-31 23:06:12 +02:00
narzoul
6f643ecf7e
Fixed popup menu palette issues
2016-03-31 23:06:06 +02:00
narzoul
ac305fbbba
DIB based palette converter
2016-03-31 23:06:00 +02:00
narzoul
71e90210ad
Introduced a DirectDraw repository for reusable objects
2016-03-31 23:05:54 +02:00
narzoul
0c030f8d57
Eliminated flickering in popup menus
...
DC redirection for popup menus is suppressed unless requested from WM_PAINT.
2016-03-31 23:05:48 +02:00
narzoul
460433c858
Hooked GdiDrawStream
2016-03-27 12:11:07 +02:00
narzoul
4f4b0cf732
Disabled immersive context menus
...
Immersive context menus don't display correctly when theming is disabled:
all menu items have empty labels and no icons.
Disabled this menu style through a faked registry value.
2016-03-24 23:12:28 +01:00
narzoul
62334dd32a
Handle null pointers when logging strings
2016-03-24 22:57:45 +01:00
narzoul
96ba6c4b5b
Handle undocumented menu selection change message
...
Now the selection is properly cleared also when the mouse leaves the menu window area.
2016-03-21 23:30:53 +01:00
narzoul
68d3c75c95
Extracted function hooking to its own unit
2016-03-21 22:51:56 +01:00
narzoul
1a7319dbee
Updated readme
...
Some minor tweaks and removed development details as I'm too lazy to keep it up to date.
2016-03-21 00:08:13 +01:00
narzoul
7c06d9440b
Added WM_PAINT handling for popup menus
2016-03-20 22:58:51 +01:00
narzoul
91a158020a
Added WM_PAINT handling for scroll bar controls
...
Now size box rendering works correctly, so no need for that workaround in
CompatGdiScrollBar.
There seems to be a bug with subclassing scroll bars though, as the cursor
will no longer change to a sizing arrow when it's over a size box control.
At least there is a simple workaround for that via WM_SETCURSOR.
2016-03-20 22:58:11 +01:00
narzoul
6850fc449c
Moved WM_ERASEBKGND handling to DefWindowProc
...
Unfortunately, Edit and ListBox controls don't seem to handle WM_ERASEBKGND
through DefWindowProc, so their window procedures need additional hooking.
2016-03-19 21:41:04 +01:00
narzoul
7ece7eed97
Moved WM_NCPAINT handling to DefWindowProc
2016-03-19 19:25:13 +01:00
narzoul
71586cc994
Hooked PolyPatBlt
...
Makes the button highlight workaround unnecessary.
2016-03-19 19:09:39 +01:00
narzoul
8c286d21bd
Additional debug info for HWND and HDC parameters
2016-03-19 17:13:37 +01:00
narzoul
8e456eafcb
Implemented WindowFromDC for compat DCs
2016-03-19 17:13:31 +01:00
narzoul
e8c5cd02d3
Added handling of WM_PRINT and WM_PRINTCLIENT through DefDlgProc/DefWindowProc
2016-03-19 17:13:14 +01:00
narzoul
c93da30330
Added child window invalidation to scroll functions
2016-03-19 13:38:41 +01:00
narzoul
53ae753ae0
Moved unrelated functions from CompatGdiDcFunctions to a new namespace
2016-03-19 13:33:07 +01:00
narzoul
0b5247d93d
Moved HOOK_GDI_FUNCTION macro to resuable scope
2016-03-19 13:26:34 +01:00
narzoul
27eec14ee1
Renamed the namespace, functions and macros in CompatGdiDcFunctions
2016-03-19 13:22:30 +01:00
narzoul
ffc74aeb26
Renamed CompatGdiFunctions source files to CompatGdiDcFunctions
2016-03-19 13:15:22 +01:00
narzoul
631c701e57
Implemented copying of GDI DC transformations, mapping mode and layout
2016-03-15 11:03:58 +01:00
narzoul
aed19e5179
Removed dead code
...
The oject type of DCs created by DirectDraw is OBJ_MEMDC, so getDc would have
already returned nullptr earlier.
2016-03-06 16:47:02 +01:00
narzoul
c0fd60207a
Added invalidation of child windows on scroll events
...
Fixed in issue with adjusting the game speed slider in StarCraft's Battle.net interface.
It was resulting in a WM_HSCROLL message erasing the parent window background without also
redrawing the child windows (labels) on it.
2016-02-28 17:45:45 +01:00
narzoul
fa69ef4a17
Improved debug logging of GDI function calls and window messages
2016-02-28 17:40:50 +01:00
narzoul
2f85be8952
Workaround for corrupted background on toolbar icons
2016-02-27 19:26:50 +01:00
narzoul
1ab496cbf5
Minimize invalidation on window position changes
2016-02-21 12:03:31 +01:00
narzoul
0244c8c022
Added manual rendering of default push button highlight
2016-02-19 23:23:39 +01:00
narzoul
3588072155
Fixed caret position and visibility issues
2016-02-15 22:39:51 +01:00
narzoul
941b55f546
Improved detection of scrolling events
2016-02-15 22:39:44 +01:00
narzoul
4a83a15d78
Invalidate GDI content when palette changes
2016-02-15 22:39:37 +01:00
narzoul
d51cfa1b14
Fixed/refactored manual rendering of the size box
2016-02-15 22:39:30 +01:00
narzoul
66ebcd7696
Added manual rendering of scroll bar arrows
2016-02-15 22:39:22 +01:00
narzoul
ab35223c2f
Added manual rendering of title bars
2016-02-15 22:39:15 +01:00
narzoul
93e06700c1
Updated the readme with license info
2016-02-05 00:36:52 +01:00
narzoul
1a1d3c4ac3
Added LICENSE.txt
2016-02-05 00:09:48 +01:00
narzoul
acd61bbed3
Disabled DWM transitions and nonclient area rendering
...
Disabling DWM nonclient area rendering restores proper hit testing for the
non-themed caption buttons.
Transitions are disabled just in case.
2016-01-23 23:36:01 +01:00
narzoul
e258a17b18
Draw size box for windows with WS_SIZEBOX style
2016-01-23 23:01:01 +01:00
narzoul
7555fb02d2
Fixed scrollbars not updating when scrolling
...
The nonclient area is now also invalidated when scrolling.
Added similar handling for WM_MOUSEWHEEL messages.
2016-01-23 20:40:01 +01:00
narzoul
3007169592
Added GDI redirection for some additional functions
2016-01-23 17:02:41 +01:00