diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-07-08 19:23:55 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-07-08 19:23:55 +0100 |
commit | 3c818abaea53b61c15393d1aeaefd1eba52f4d5c (patch) | |
tree | 13704d81d7041a4cd4bc44414baf0de6045021db /cocoa/gui.m | |
parent | e7e914b6242a17abebb84ecfc5f0b1facaac4e94 (diff) | |
parent | 0694f345daa509546d79f31be285987f43cc5be3 (diff) | |
download | netsurf-3c818abaea53b61c15393d1aeaefd1eba52f4d5c.tar.gz netsurf-3c818abaea53b61c15393d1aeaefd1eba52f4d5c.tar.bz2 |
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Diffstat (limited to 'cocoa/gui.m')
-rw-r--r-- | cocoa/gui.m | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cocoa/gui.m b/cocoa/gui.m index 1cb19a756..8f08fc7fa 100644 --- a/cocoa/gui.m +++ b/cocoa/gui.m @@ -53,7 +53,7 @@ static void gui_poll(bool active) { cocoa_autorelease(); - NSEvent *event = [NSApp nextEventMatchingMask: NSAnyEventMask untilDate: active ? nil : [NSDate distantFuture] + NSEvent *event = [NSApp nextEventMatchingMask: NSAnyEventMask untilDate: [NSDate distantFuture] inMode: NSDefaultRunLoopMode dequeue: YES]; if (nil != event) { @@ -129,8 +129,20 @@ static void gui_window_set_scroll(struct gui_window *g, int sx, int sy) [[(BrowserViewController *)g browserView] scrollPoint: cocoa_point( sx, sy )]; } -static void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, - bool scaled) +/** + * callback from core to reformat a window. + */ +static void cocoa_window_reformat(struct gui_window *gw) +{ + if (gw != NULL) { + [[(BrowserViewController *)gw browserView] reformat ]; + } +} + + +static void gui_window_get_dimensions(struct gui_window *g, + int *width, int *height, + bool scaled) { NSCParameterAssert( width != NULL && height != NULL ); @@ -278,6 +290,7 @@ static struct gui_window_table window_table = { .set_scroll = gui_window_set_scroll, .get_dimensions = gui_window_get_dimensions, .update_extent = gui_window_update_extent, + .reformat = cocoa_window_reformat, .set_title = gui_window_set_title, .set_url = gui_window_set_url, |