diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-10-14 19:33:00 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-10-14 19:33:00 +0000 |
commit | 43029944aea1d3655c675f86d0874d620f65b885 (patch) | |
tree | 3de6520f7eb9a64de74746f832970e7c2bf7d0ce /windows/gui.c | |
parent | 1dbbbaf64ad0c8e3cd81ea7453f091f3bb4c9075 (diff) | |
download | netsurf-43029944aea1d3655c675f86d0874d620f65b885.tar.gz netsurf-43029944aea1d3655c675f86d0874d620f65b885.tar.bz2 |
fix thumbnailing and localhistory
svn path=/trunk/netsurf/; revision=10885
Diffstat (limited to 'windows/gui.c')
-rw-r--r-- | windows/gui.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/windows/gui.c b/windows/gui.c index 0c29cfdad..85833fecf 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -70,6 +70,7 @@ char *options_file_location; struct gui_window *input_window = NULL; struct gui_window *search_current_window; struct gui_window *window_list = NULL; +HWND font_hwnd; FARPROC urlproc; WNDPROC toolproc; @@ -119,7 +120,6 @@ struct gui_window { RECT *fullscreen; /**< memorize non-fullscreen area */ RECT redraw; /**< Area needing redraw. */ - RECT clip; /**< current clip rectangle */ int requestscrollx, requestscrolly; /**< scolling requested. */ struct gui_window *next, *prev; /**< global linked list */ }; @@ -159,11 +159,12 @@ void gui_poll(bool active) { MSG Msg; if (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE) != 0) { - if (!((current_gui == NULL) || +/* if (!((current_gui == NULL) || (TranslateAccelerator(current_gui->main, current_gui->acceltable, &Msg)))) { TranslateMessage(&Msg); - } + } +*/ DispatchMessage(&Msg); } @@ -721,15 +722,16 @@ static LRESULT nsws_drawable_paint(struct gui_window *gw, HWND hwnd) { PAINTSTRUCT ps; + HDC hdc, tmp_hdc; - BeginPaint(hwnd, &ps); + hdc = BeginPaint(hwnd, &ps); if ((gw != NULL) && (gw->bw != NULL) && (gw->bw->current_content != NULL)) { - /* set globals for the plotters */ - current_hwnd = hwnd; - current_gui = gw; + /* set global HDC for the plotters */ + tmp_hdc = hdc; + plot_hdc = hdc; content_redraw(gw->bw->current_content, -gw->scrollx / gw->bw->scale, @@ -743,6 +745,7 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd) gw->bw->scale, 0xFFFFFF); + plot_hdc = tmp_hdc; } EndPaint(hwnd, &ps); @@ -1422,8 +1425,6 @@ nsws_window_event_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) return DefWindowProc(hwnd, msg, wparam, lparam); } - current_gui = gw; - switch(msg) { /* @@ -1640,7 +1641,7 @@ gui_create_browser_window(struct browser_window *bw, /* set the gui window associated with this toolbar */ SetProp(gw->drawingarea, TEXT("GuiWnd"), (HANDLE)gw); - + font_hwnd = gw->drawingarea; input_window = gw; open_windows++; ShowWindow(gw->main, SW_SHOWNORMAL); @@ -1780,13 +1781,6 @@ RECT *gui_window_redraw_rect(struct gui_window *w) return &(w->redraw); } -RECT *gui_window_clip_rect(struct gui_window *w) -{ - if (w == NULL) - return NULL; - return &(w->clip); -} - int gui_window_width(struct gui_window *w) { if (w == NULL) |