summaryrefslogtreecommitdiff
path: root/vcl/source/window
AgeCommit message (Collapse)AuthorFilesLines
2015-08-03tdf#92982 vcl rendercontext: no need to call SetupBuffer() twiceMiklos Vajna1-2/+0
No need to call it in PaintHelper::StartBufferedPaint(), which would happen only for the root of the paint hierarchy. It's enough to do it in PaintHelper::DoPaint(), which happens for each widget. Change-Id: Iaf3306ef746bedbe64be36c4efeae73afd75db2a
2015-08-03tdf#92982 vcl rendercontext: no buffer is created hereMiklos Vajna1-5/+5
Change-Id: Iebcf9ec9f54102ca13dd36a3d3c2d2b6137dc0f0
2015-07-31tdf#92982 vcl rendercontext: handle empty repaint rect in PaintHelperMiklos Vajna1-1/+5
Empty repaint rectangle means the whole window, while Erase() is a NOP in case of an empty rectangle. This fixes the sidebar rendering artifacts the screenshot shows in the bugreport. Change-Id: I12e35ceb0aa529d65b7acf01d8cdb719101adebe
2015-07-31tdf#92982 vcl rendercontext: set buffer size in ImplHandleResize()Miklos Vajna2-3/+7
Instead of in PaintHelper::StartBufferedPaint(). If the buffer size is set to match the size of a sub-widget (for which the paint was triggered), then client using the buffer as a persistent vdev are unable to paint at arbitrary locations. For example, if we painted the ruler, then the blinking cursor won't be able to paint to the SwEditWin area. Change-Id: Iba07070baafb5b802fc6da200696611afd2010d7
2015-07-30tdf#92982 vcl: stop creating/disposing the paint buffer in PaintHelperMiklos Vajna2-14/+22
Instead: - create it early in Window::ImplInit(), except for the default window (that one is a chicken-and-egg problem, as creating a VirtualDevice invokes ImplGetDefaultWindow(), but creating the default window then would create a VirtualDevice) - only erase the painted area of the buffer, don't create it - use a separate bool in the frame state to track if we're in the middle of a (possibly recursive) buffered paint And with that, rename CreateBuffer() to StartBufferedPaint(), as it does not create the buffer anymore. Change-Id: Ib33e8afa36977aa809f0ea2158a369f288cba8c7
2015-07-29tdf#92982 vcl::Cursor: handle rendercontextMiklos Vajna1-5/+6
With this, vcl::Cursor does not paint on the vcl::Window directly, and in case the output should be something other than pRenderContext, it should be a one-liner change to do that. Change-Id: I57833f6f8589286260d96f412f1fcc681e6c5c8c
2015-07-29tdf#92982 vcl rendercontext: move buffer from PaintHelper to ImplFrameDataMiklos Vajna1-57/+60
With this, code that wants to take a persistent render context (e.g. vcl::Cursor) will be able to do so. This commit just moves the buffer, though: it's still created / deleted by PaintHelper. Having it in ImplFrameData means that we'll have one buffer / one system window: i.e. toplevel window and its sub-widgets share a buffer. Change-Id: Ic37220a2a483a7389aa04cd4313b6fc61a5408bf
2015-07-28tdf#92982 vcl: move Invert() member functions from vcl::Window to OutputDeviceMiklos Vajna1-68/+0
With this, vcl::Cursor will be able to paint to a vcl::RenderContext, too; not just directly, which is needed for double-buffering. Change-Id: I868f6cd9b08afe59611ef266911a894a26cacedc
2015-07-24convert ImageAlign to enum classNoel Grandin1-3/+3
Change-Id: I22e2e66a1f0b230403ad1d9c1f5b7f34a6ee6ea5
2015-07-24convert WindowAlign to scoped enumNoel Grandin6-97/+97
Change-Id: I028d108b3a83bd5541d873c4d03b87339cd3be52
2015-07-24convert WALLPAPER constants to scoped enumNoel Grandin2-5/+5
Change-Id: I3b4b4e8a94904e22823a263bd5446a2e1aa47661
2015-07-19Use sal_uInt32 consistently for WindowStateData::SetMask and relatedMatteo Casalin2-10/+10
Change-Id: I722828785a861065a69a1d83bc6e40517b164102
2015-07-17WaE: -Wmaybe-uninitializedCaolán McNamara1-1/+1
Change-Id: I295ef24b8d524e152c85b90548d8a7753347dacd
2015-07-16tdf#92706 - avoid dbaccess wizard crash.Michael Meeks1-2/+4
Hold a VclPtr on the window, make reset cleaner, and don't crash removing listeners from disposed windows. Change-Id: I3efb71117fc45562d5c740578f5e33dabb2684fe Reviewed-on: https://gerrit.libreoffice.org/17037 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-16loplugin:redundantcastNoel Grandin1-1/+1
Change-Id: Ifafd45865c93d474510bd0557bb9ab3843b7dbb7
2015-07-16vcl: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl1-26/+25
Change-Id: I11bd73ff134895d05c7ce054b5ef26829a3bf8c3
2015-07-14Revert "Avoid loplugin:staticmethods in non-debug build"Stephan Bergmann1-1/+0
This reverts commit 97df2dee8ea4f33f4efb7467cfeec2d8954c006c, obsoleted by cbce40e965acef51822b31d73da5fbc271fbcad0 "Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds."
2015-07-13loplugin:unusedmethods vclNoel Grandin1-1/+0
Change-Id: I53c66b7898f4e0a66e6172d22c6f782dadaf6589 Reviewed-on: https://gerrit.libreoffice.org/16975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13don't crash on Shift+F10, men can be null, tdf#92630 follow-upEike Rathke1-2/+2
... and actually make this work with a context menu.. Change-Id: I9a9bcdccae859cb2a54ec7db442435215e21e0e0
2015-07-12coverity#1311650 Dereference after null checkCaolán McNamara1-4/+9
Change-Id: I06e9c28f49f4231a02a7f21940ea55ef41836b67
2015-07-11asan: ensure mbMenuKey is initializedCaolán McNamara1-0/+1
Change-Id: I5404e4410b88e84f55fadb4bc82f936e1f1c2d96
2015-07-10vcl: avoid a boost::ptr_map in VclBuilderMichael Stahl1-1/+1
This eliminates 638MB of preprocessor input. Change-Id: Ife434310ec08e408e1f8aaf52d6298f8caa209af
2015-07-09tdf#92055 - make ImplBorderWindow more tolerant of post-dispose events.Michael Meeks1-5/+10
Change-Id: I9556c920e6fc8b5595eee6bd00d36669e1684e25 Reviewed-on: https://gerrit.libreoffice.org/16892 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-09tdf#92630 Enable auto-accelerator behaviour for gtkSimon Long8-23/+145
Change-Id: I671177dd1f9e535c28a29bcbd6b74f1c789371ea Reviewed-on: https://gerrit.libreoffice.org/16883 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-09tdf#92243 Read menu highlight text colour correctly from GTK themeSimon Long1-5/+4
Change-Id: Iade050c8504a1cc65b5ac345141da32898e7ebff Reviewed-on: https://gerrit.libreoffice.org/16887 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-09Gaps at end of menu separator lines read from GTK theme.spl1-2/+5
Change-Id: I3c42d918680ac989c5cd7cd1022e4a6e7b53aa11 Reviewed-on: https://gerrit.libreoffice.org/16886 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-08Avoid loplugin:staticmethods in non-debug buildStephan Bergmann1-0/+1
Change-Id: Ieb3f5a50ed0ddc9109dc0ad16caa8a8ac5b16362
2015-07-08vcl rendercontext: fix off-by-one error in PaintHelper::PaintBuffer()Miklos Vajna1-1/+13
With this, Writer no longer has leftover 1-pixel-width/height lines on scrolling at the right/bottom of the SwEditWin area. The problem was that PaintBuffer() painted one less row/column of pixels than intended. This happened because Rectangle::GetSize() uses GetWidth() and GetHeight(), which return "bound2 - bound1 + 1", but because the map mode was in twips, the +1 had no effect. For example, if top=127 and bottom=762 in pixels, then the needed height is 636, but (assuming e.g. 96 DPI) counting 11430-1905+1 in twips, then converting to pixels is only 635, so the last row/column is not painted. Fix the problem by making sure that GetSize() is invoked on a rectangle that has the size in pixels, that's how e.g. SdrPreRenderDevice::OutputPreRenderDevice() uses DrawOutDev(), too. Change-Id: I6f8686e0a91ba402db93982c25be76992c260abe
2015-07-08Fix typosAndrea Gelmini1-1/+1
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-08loplugin:unusedmethods vclNoel Grandin2-55/+1
Change-Id: I98b88ca3369a2c888fd63796e39d42376d513002
2015-07-07replace some IsDead with isDisposedCaolán McNamara1-3/+5
keep both tests for now for cowardice Change-Id: I96d922ef64b874f2124204c3c564a38fa7511ffe
2015-07-07VclPtr: no dialog loaded from a .ui ever actually destructedCaolán McNamara1-0/+1
Change-Id: I51a0596049a43cbc80f914f3d8491c2125c8109e
2015-07-07Resolves: tdf#92539 reversed logic on enable/disableCaolán McNamara1-3/+3
Change-Id: I26ef918c0a68a84c22da3979c1180a2aee7a8109
2015-07-07vcl rendercontext: avoid CopyArea() in Window::ImplScroll()Miklos Vajna1-2/+8
Direct CopyArea() does more harm than good in case of double buffering: to avoid touching the window directly, just invalidate the whole area and avoid copying. Change-Id: I678c5b0a38fc089675fd030d2da4132684a5d6a6
2015-07-07Fix some misspellingsTor Lillqvist1-1/+1
Change-Id: I564b4df26c45c035f455ecf6db573b25c5eb4699
2015-07-07Fix some misspellingsTor Lillqvist1-2/+2
Change-Id: Iff2303650e1dcfc56064907a28df1c4c452eac56
2015-07-06Revert "vcl::Window::SupportsDoubleBuffering: respect ↵Miklos Vajna1-2/+1
VCL_DOUBLEBUFFERING_FORCE_ENABLE" This reverts commit 7df3879d3f6222b840724ae748bdf8bf6a7af9f1. It's not necessary since commit f16d82ea8f1d2815faa978a4481c6b3c9c8705f8 (make it possible to force enable double buffering for all widgets, 2015-06-03).
2015-07-06ImplRestore() can be privateTor Lillqvist1-5/+4
It is only called from other member functions. Also, all the calls are inside conditionals that check mpData && mpData->mbCurVisible already, so no need to check anew in the function. Use an assert() instead. Change-Id: Ibcde0aa43877b64b9b0ae5117cbda1fb44ee023d
2015-07-04Fix typosAndrea Gelmini2-2/+2
Change-Id: Id9296115f30858e7fd470a199e59343a96d7deec Reviewed-on: https://gerrit.libreoffice.org/16712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03tdf#92392 - tolerate Window::SetText post dispose.Michael Meeks1-1/+1
Change-Id: I458f8e8665373d3e5ab9ed20e39783f4d34ca128
2015-07-03Revert "Don't belive the 'draw direct' parameter when double-buffering"Tor Lillqvist1-3/+0
it introduces other problems instead. This reverts commit 05806f4603476dd150af7770543fea749cc6d10c.
2015-07-03Don't belive the 'draw direct' parameter when double-bufferingTor Lillqvist1-0/+3
Avoids leftover artefacts of the blinking text insertion cursor. Did not seem to have any ill effects. Change-Id: I8a1e7413034eacb3014a4ca902cf5e72bda492a4
2015-07-01vcl::Window::SupportsDoubleBuffering: respect VCL_DOUBLEBUFFERING_FORCE_ENABLEMiklos Vajna1-1/+2
Double buffering default is false, then can be enabled on a per-widget basis, finally this can be overriden at runtime by the VCL_DOUBLEBUFFERING_FORCE_ENABLE environment variable (so that everything is painted using double buffering). Let SupportsDoubleBuffering() also respect this variable, so code calling SupportsDoubleBuffering() can react to the runtime override, too. Change-Id: Ic9a1c00a801f6976069d7cfc47c3fa491ebc1ff0
2015-06-30gtk3: bizarro macosx default text area height calc infected gtk3Caolán McNamara1-0/+2
mbNoFocusRects is also the case now for gtk3, but this unfortunate heuristic makes the database and chart wizards and various other things just way too tall. This is likely a desperate effort to make pre layout dialogs size to something sensible Change-Id: I501f04ad96063935dd1f162e009ffd5053a820c4
2015-06-30Fix typosAndrea Gelmini1-2/+2
Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e Reviewed-on: https://gerrit.libreoffice.org/16582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-30gtk3: draw disabled menubars entries with disabled text colorCaolán McNamara2-4/+9
Change-Id: I9188c6071f62d13a688c1eb6b14b1ac3f7dc77d4
2015-06-29tdf#91055 Pass by Address - lcl_createWindowInfodanlrobertson1-26/+36
lcl_createWindowInfo now takes a pointer. In addition, a temporary pointer and if statement in the funcitons while loop was used in favor of a temporary pointer used throughout the function. There should be no side effects due to this change. The change is largely cosmetic. Change-Id: Ib5be6f792c4120c0e0b51562ba541b98a011c49e Reviewed-on: https://gerrit.libreoffice.org/16537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9 Reviewed-on: https://gerrit.libreoffice.org/16523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff Reviewed-on: https://gerrit.libreoffice.org/16522 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-24tdf#91380 add WB_MOVEABLE bit to docking windowsAndras Timar1-1/+1
Change-Id: Iab913747180bf1588da2d703069650e3e6916414 Reviewed-on: https://gerrit.libreoffice.org/16444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>