aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/mac.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-16 20:32:32 +0100
committerDavid Robillard <d@drobilla.net>2020-03-16 21:21:15 +0100
commitfc32174ab3902a5221767a3ce04e065209d9975c (patch)
treeb614fe875b9c0087906f91ead5fe330ffae18c3b /pugl/detail/mac.m
parenta54361853bdfa08437c2858e603ce6202fb341b2 (diff)
downloadpugl-fc32174ab3902a5221767a3ce04e065209d9975c.tar.gz
pugl-fc32174ab3902a5221767a3ce04e065209d9975c.tar.bz2
pugl-fc32174ab3902a5221767a3ce04e065209d9975c.zip
Simplify puglRequestAttention()
Now that timers are exposed, applications can repeatedly nag for attention themselves if they really want to.
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r--pugl/detail/mac.m17
1 files changed, 0 insertions, 17 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 1c81abe..8a0f0c2 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -635,11 +635,6 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
puglPostRedisplay(puglview);
}
-- (void) urgentTick
-{
- [puglview->world->impl->app requestUserAttention:NSInformationalRequest];
-}
-
- (void) timerTick:(NSTimer*)userTimer
{
const NSNumber* userInfo = userTimer.userInfo;
@@ -696,12 +691,6 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
{
(void)notification;
- PuglWrapperView* wrapperView = window->puglview->impl->wrapperView;
- if (wrapperView->urgentTimer) {
- [wrapperView->urgentTimer invalidate];
- wrapperView->urgentTimer = NULL;
- }
-
PuglEvent ev = {{PUGL_FOCUS_IN, 0}};
ev.focus.grab = false;
puglDispatchEvent(window->puglview, &ev);
@@ -918,12 +907,6 @@ puglRequestAttention(PuglView* view)
{
if (![view->impl->window isKeyWindow]) {
[view->world->impl->app requestUserAttention:NSInformationalRequest];
- view->impl->wrapperView->urgentTimer =
- [NSTimer scheduledTimerWithTimeInterval:2.0
- target:view->impl->wrapperView
- selector:@selector(urgentTick)
- userInfo:nil
- repeats:YES];
}
return PUGL_SUCCESS;