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
94dc91a4
Commit
94dc91a4
authored
Apr 02, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Apr 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: During live resize, force occasional redisplay due to spontaneous redrawing.
parent
9374c5bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
cocoa_window.h
dlls/winemac.drv/cocoa_window.h
+2
-0
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+37
-0
No files found.
dlls/winemac.drv/cocoa_window.h
View file @
94dc91a4
...
...
@@ -52,6 +52,8 @@
NSInteger
levelWhenActive
;
NSTimer
*
liveResizeDisplayTimer
;
BOOL
causing_becomeKeyWindow
;
BOOL
ignore_windowMiniaturize
;
BOOL
ignore_windowDeminiaturize
;
...
...
dlls/winemac.drv/cocoa_window.m
View file @
94dc91a4
...
...
@@ -350,6 +350,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
-
(
void
)
dealloc
{
[
liveResizeDisplayTimer
invalidate
];
[
liveResizeDisplayTimer
release
];
[
queue
release
];
[
latentParentWindow
release
];
[
shape
release
];
...
...
@@ -1115,6 +1117,13 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
[
NSApp
wineWindow
:
self
ordered
:
NSWindowAbove
relativeTo
:
nil
];
}
-
(
void
)
windowDidEndLiveResize
:
(
NSNotification
*
)
notification
{
[
liveResizeDisplayTimer
invalidate
];
[
liveResizeDisplayTimer
release
];
liveResizeDisplayTimer
=
nil
;
}
-
(
void
)
windowDidMove
:
(
NSNotification
*
)
notification
{
[
self
windowDidResize
:
notification
];
...
...
@@ -1176,6 +1185,34 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
ignore_windowMiniaturize
=
FALSE
;
}
-
(
void
)
windowWillStartLiveResize
:
(
NSNotification
*
)
notification
{
// There's a strange restriction in window redrawing during Cocoa-
// managed window resizing. Only calls to -[NSView setNeedsDisplay...]
// that happen synchronously when Cocoa tells us that our window size
// has changed or asynchronously in a short interval thereafter provoke
// the window to redraw. Calls to those methods that happen asynchronously
// a half second or more after the last change of the window size aren't
// heeded until the next resize-related user event (e.g. mouse movement).
//
// Wine often has a significant delay between when it's been told that
// the window has changed size and when it can flush completed drawing.
// So, our windows would get stuck with incomplete drawing for as long
// as the user holds the mouse button down and doesn't move it.
//
// We address this by "manually" asking our windows to check if they need
// redrawing every so often (during live resize only).
[
self
windowDidEndLiveResize
:
nil
];
liveResizeDisplayTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1
.
0
/
30
.
0
target
:
self
selector
:
@selector
(
displayIfNeeded
)
userInfo
:
nil
repeats
:
YES
];
[
liveResizeDisplayTimer
retain
];
[[
NSRunLoop
currentRunLoop
]
addTimer
:
liveResizeDisplayTimer
forMode
:
NSRunLoopCommonModes
];
}
/*
* ---------- NSPasteboardOwner methods ----------
...
...
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