path: root/vcl/source/window
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06tdf#104686: do not crash if Menu has been somehow disposedAron Budea4-30/+56
The rare crashes in MenuFloatingWindow::ImplGetStartY() and MenuFloatingWindow::ImplScroll(bool) likely happen because of a disposed Menu. Let's guard against invalid accesses. Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <> Reviewed-on: Reviewed-by: Aron Budea <> Reviewed-on: Tested-by: Aron Budea <>
2017-02-27Resolves: tdf#101972 skip invalidating labels on alt if autoaccel is disabledCaolán McNamara2-2/+2
so no Invalidate will be called if auto accelerators are not enabled so there should be no blinking under windows (cherry picked from commit f67dc04cfdd9e63a45ec6c8bc00829bce8f17d4b) Change-Id: Iccc5dad7af41f39ac02d3be93e935f2d926a82a6 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Miklos Vajna <> (cherry picked from commit 0d8746c091ce3e70340c431da8d35d453d2b3b2c)
2017-01-07tdf#105151 - be more conservative about EndTracking / Tracking calls.Michael Meeks1-1/+5
We really shouldn't be emitting these into widgets after they are disposed - it serves only to confuse things. Restore behaviour to how it was before the VclPtr change for this. Change-Id: Ife666929f8aac0e4431a5e43970769692c11888c Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <> (cherry picked from commit d788d37a16d382d7ff32a19e8d65e5c605ac55dd) Reviewed-on: Reviewed-by: Ashod Nakashian <> Tested-by: Ashod Nakashian <>
2016-11-26tdf#101327 - tolerate exceptions during window construction better.Michael Meeks1-3/+13
It appears we can end up being a frame window, which is not added into the list of frames; so tolerate that. Change-Id: I7696e79636f7794f327027f0ca73363eef1937e5 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Meeks <> Tested-by: Michael Meeks <>
2016-08-15Related: tdf#92516 make menu accelerators always work even if...Caolán McNamara1-11/+2
keyboard not used yet. The gtk2/3 menus appear to work this way. (And when not in gtk2/3 it shouldn't disable the accelerators for other platforms anyway) (cherry picked from commit f6d0d92a5e249413df99a7f3677a28efe6d45426) Change-Id: Ib7a99bd9039cd07120b3b77380f810b5b028fd57 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Miklos Vajna <> (cherry picked from commit 1288a0682ab4c960915722d2bb52a200e75580a3)
2016-07-21tdf#100600 sfx2 classification: never replace the control with labelMiklos Vajna1-0/+6
Thanks to Caolán McNamara for pointing out where is the condition of the replacement in VCL. Change-Id: I7e1ef4a016a37b25e084c4c6467a42ca557069a4 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins <> (cherry picked from commit 8192da8e4de7a058ef95253f992f4143f83fa0f1)
2016-07-20convert more DBG_ASSERT(false to SAL_WARNNoel Grandin3-3/+3
Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> (cherry picked from commit 272a8afa60fe9a6b497c69a58b0054ad5b880690) Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55
2016-07-20remove some unnecessary castingNoel Grandin1-1/+1
Change-Id: I451df09db58256fed68ce8537b2d8eb4b6ab6942 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> (cherry picked from commit 2ed5fa14f0e7624db241fde26e10fdd1009adfc7)
2016-07-20Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann3-5/+5
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. (cherry picked from commit 14cd5182c5f64c43581c82db8c958369152226ac) Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-07-20tdf#99352 - Some VclPtrs leak past DeInitVCLNoel Grandin1-0/+1
Change-Id: I74b27b1d8b662a644df580ae128643b8495355f8 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> (cherry picked from commit 67d333c608a662621c1069aacdec75e45e33a183)
2016-07-20tdf#97087 Give comprehensible names to timersMuhammet Kara1-1/+1
Timers and idles should have programmer comprehensible, unique names Change-Id: I837d1890c687936f8a31278c0102391e6f87212d Reviewed-on: Reviewed-by: Michael Meeks <> Tested-by: Michael Meeks <> Tested-by: Jenkins <> (cherry picked from commit c03a11b8f0c93b1c55d9abc9aa224aeb298d1976)
2016-07-20vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock2-2/+2
Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Chris Sherlock <> (cherry picked from commit 28c96fc2553a5c3dee108f1e2060d7bc081a7e7e) Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f
2016-07-20Fix typosAndrea Gelmini5-5/+5
Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Ashod Nakashian <> (cherry picked from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067) Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
2016-07-12loplugin:unusedfieldsNoel Grandin1-1/+0
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864 (cherry picked from commit ec3f72415850bd865eb030cf2b7edb55b99d4756)
2016-07-12update loplugin stylepolice to check local pointers varsNoel Grandin1-212/+212
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
2016-06-18crashreport: 644837b5-c445-4779-a75d-dd69fc2e3a6fCaolán McNamara2-5/+10
drop hint of previous window to get mouse wheel event when that window is disposed in order to drop any references to it immediately that happens to avoid anything else lingering too late move the VclPtr into ImplSVData alongside the rest of the things like this so we can remove the static VclPtr which itself replaced a relatively harmless static Window* (cherry picked from commit bdfccfde308f0267965933a8273e6e9201a2c67c) (cherry picked from commit 35205c6e3e2f85d9b7db935689ec949c98e7e431) Change-Id: I1e172071b711b6e4ded9a813ee3de730d3dfdf38 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Stahl <> (cherry picked from commit f7ad46993279d1da56980fc100b3961e5e349400)
2016-06-16gtk3: some changes towards enabling native gtk3 popup menusCaolán McNamara1-8/+7
these menubar things can be menu things and can then do away with the casting, no logic changes intended Change-Id: Ibb1b5354d5e1483327f172d6890e134f1e4b9ee4
2016-06-11Resolves: tdf#100248 vcl menu scroll timer still active post disposeCaolán McNamara1-0/+6
Change-Id: I8988a42e7e505c967661c4a5f3c1e4ef3fbc08e0 (cherry picked from commit f89b9d8b8064a2f323f5b3362f88cb873bad8fcc) (cherry picked from commit 7def34c0f013b0c9ac1b8ee39e800577bfa800e7) Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Stahl <> (cherry picked from commit 11ca1ad43cc2def184ff7629e3880ccab6b8a1f1)
2016-06-11only init the OpenGL context if we need itMarkus Mohrhard1-6/+40
Change-Id: I8634589bc0c8ef317089eb08c07974ed81d98982 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Miklos Vajna <> (cherry picked from commit 8a94e538c3306b2af1a76c724e4dcae0e3968164)
2016-05-31Resolves: tdf#92695 protect both branches against missing ToolItemCaolán McNamara1-8/+7
(cherry picked from commit ab0dc9524a36a394e97df9499bf1f5e4b94cfdca) (cherry picked from commit c845c7bf597caa11b1617ab71029c499819028bc) Related: tdf#92695 we already have ImplGetItem from mnHighItemId here no logic change intended (cherry picked from commit c380f0fc125f50ad8efca2ce032d3d2a67d78f0a) (cherry picked from commit df668868917d1dac11d49f1f650c43666fadea54) Change-Id: Ide54fddf7b217e65a405bd80853d5302a419f046 a53a21db56c857e1274c60f846fc955fef9e3dfb Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Michael Stahl <>
2016-03-25tdf#94734: fix icon in sidebar disappears when changing font colourBjoern Michaelsen1-1/+9
- properly initalize maImageOriginal along with maImage in various places - this is a regression from 27d94c482e82ea5d4f202109614c6fb3578fb0a4 - that commit is mostly innocent in itself though, only exposing omissions from b8f21298288890d52c06fef6c84441634c56c986 - having both maImage and maImageOriginal is extremely fragile as-is -- likely I'd be helpful to have them private in ImplToolItem and then a SetImage accessor with a tristate eOriginal/eCached/eBoth enum parameter to prevent oversights like this in the future ... Change-Id: I294d7ed8e07be5cadec0ae251cc08c8d089bd059 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tomaž Vajngerl <>
2016-03-14Related: tdf#98419 set a min size on un-resizeable non-layout dialogsCaolán McNamara1-0/+4
(see also rhbz#1281906) a min size equates to a size-request which is reliable under gtk3+wayland as the dialog contents size. a default size equates to the size of the dialog, which includes decorations under wayland (cherry picked from commit afeddaf7e0d11ad9b1df0c80bcc3f50caa87e21a) Change-Id: I20baf00fb5952ab93628f4dd6891779ce682783c Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Eike Rathke <>
2016-02-19Resolves: tdf#97953 spinbuttons are not suitable for reuse as up/down arrowsCaolán McNamara1-2/+2
(cherry picked from commit 4f034adcb79684bc4138e2f9708defd8a3532f74) Change-Id: Ibcd7bd4099210a26513caac6e3b16a88a4c8abad refactor ImplDrawSpinButton there is (supposed to be anyway) no logic change here, just unwind the overly complex flow Change-Id: I9c96f41b0480a60c486b476f383d856b464cd62d (cherry picked from commit 55b33456c14aa5311fb0e3d71f1cad4fbd73cbef) Reviewed-on: Reviewed-by: David Ostrovsky <> Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2016-02-18tdf#97922 - Mend nonsensical spin invalidation to improve rendering.Michael Meeks1-7/+6
Change-Id: I3a398c47c69cc292a681ebe2414d844c224f3e3e Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Tomaž Vajngerl <>
2016-01-29tdf#95587: Make rectangle control within tab pages work againKatarina Behrens1-7/+27
Since commit 74407aef94b6d8dfdd6, tab pages|controls are considered to be container widgets (thus, search for the nearest non-layout parent will never find a tab page parent, breaking rectangle control in many dialogs). I've no idea how many other functions' behaviour this changes in an unexpected way, so I've reverted that bit. That however means implementing slightly different approach to tdf#92630 in dialogs (for a tab dialog, find current tab page and go through its children) Change-Id: I3ff5ac13f04b1c5c799c7a1a3769108927809f31 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Thorsten Behrens <> (cherry picked from commit 39471da6e4d016c52c6cdf6553d7418416a160f4) Reviewed-on: Reviewed-by: Miklos Vajna <>
2016-01-28Resolves: tdf#93054 gtk3: implement drag and dropCaolán McNamara1-0/+1
Change-Id: Ib644ea36b8a9e68e023e465ef159b9a4890e5d37 (cherry picked from commit a5b4f6e456bfb735385e8d3d6945ea8f3be1ba94)
2016-01-28remove newly unused WB_NEEDSFOCUS and fragile FLOAT_FOCUSABLECaolán McNamara2-4/+2
Change-Id: Idce03318fbc01039a6c0638879785607970993c0 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 016730421e5e58415170b464bf9d9ca47d6c3b4e)
2016-01-28Related: rhbz#1289394 always provide the screen area the tip applies toCaolán McNamara2-2/+9
this will make it easier to implement native help tips Change-Id: I984dfadaf02e9b7bf542ba82cf070911c89cb699 (cherry picked from commit 01ef12d173fb2c54a49186c8eb4fa40288b82945)
2016-01-26Resolves: tdf#97331 use VclPtr instead of pointers to avoid crashCaolán McNamara1-7/+7
Change-Id: Ia653a67046cb2cfb7c96367a7483ddc0cb29819e (cherry picked from commit 5d29ed1801a07d4649e095c25935b50f5ad32eb4)
2016-01-12tdf#96655 - clear non-offscreen status bar controls before render.Michael Meeks1-3/+4
Change-Id: I02a85ae4572dc23df2157af1cf164a0f82701613 Reviewed-on: Reviewed-by: Tor Lillqvist <> Tested-by: Tor Lillqvist <>
2015-12-16tdf#96119 Cannot select item with mouse in any combobox / drop down menuJuergen Funk1-0/+3
this commit has make the problem, the removing of the SALEVENT_MOUSEACTIVATE commit dd351dd728687cffe432ce0ec9367ceb80e097fb Author: Noel Grandin <> Date: Tue Nov 24 08:50:39 2015 +0200 loplugin:unusedfields in vcl/ and remove the unused SALEVENT_MOUSEACTIVATE stuff Without of there, when click in the opened list-box it send first the "PreNotify" with "MouseNotifyEvent::LOSEFOCUS" and that close the listbox. After that, it send the mouse-event to a closed window, that is the reason why the Listbox not get the mouse-click. With this patch, first send the mouse-click and then the "PreNotify" Change-Id: I5a09b1524335434f043d22bc71f7e38559fb1c0b Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <> Reviewed-on: Tested-by: Noel Grandin <>
2015-12-15gtk3+wayland: enable manual movement of toolbarsCaolán McNamara2-1/+8
via gtk_window_begin_move_drag so add some BYDRAG/ByDrag hints to select mechanism to move window by Change-Id: Icc58653dff752a6d4ee49446647d7ede2af9dd9b (cherry picked from commit ea4c75dcc9c3e53e7ef40bd273ea18a48ea9b18d)
2015-12-14Related: rhbz#1290014 gtk3: use gtk_window_set_modal on modal dialogsCaolán McNamara1-1/+2
which makes modal dialogs (which are most of them) place correctly under wayland. Modeless ones are still uselessly shoved far to the left, but this makes things near usable and gives the same "graying into the bg" effect for the main window as other gtk apps Change-Id: If1486feb7631c5a0c2aa6efac3a6b9dd1b215daf Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 8d5822983e9b6a1e04874ce4d2c807fd0cf1ee04) Reviewed-on:
2015-12-11tdf#85767 Enable rotated/flipped icons in the SidebarSamuel Mehrbrodt2-5/+38
This is a combination of 3 commits: * Make buttonstatuslistener a generic listener for any widgets ac97f32307feb488c86d6fa962258fe79320d31b * Move icon rotation/flip handling from ToolbarManager to vcl's Toolbar c5fe98905deac6de4f9e76a17097ce83fe381ac3 * These should still be virtual. e20df218257c45c5daa234daafac9609d53aa77f Change-Id: I34e2446660ec94d60654b4db40ce1bbb8014477f Reviewed-on: Reviewed-by: Samuel Mehrbrodt <> Tested-by: Samuel Mehrbrodt <>
2015-12-03Resolves: tdf#95700 index dialog cut offCaolán McNamara1-2/+4
queue_resize needs to invalidate the size cache even if there is a pending layout idle awaiting Change-Id: I6dba3d37fbb33125cc3f5d17aff6d2f7a3388654 (cherry picked from commit d40d756f4079a228035b5db346da50fe7aed0bd2)
2015-11-26vcl: reduce pointless timer / scheduler / idle includes.Michael Meeks2-4/+10
Change-Id: I8bf7f8d6ba1a54f2969e055956fadc52ff6c8673
2015-11-24Vcl Toolbox: Move Impl and local defines out of header filesSamuel Mehrbrodt2-4/+87
This reverts part of 1e82a3e6e3ea8b5cda520551faed81bc74c848c1 Change-Id: I683a855727c4a52d3ac6a7c5a1f104a6cf5b9ee2
2015-11-24loplugin:unusedfields in vcl/Noel Grandin3-5/+0
and remove the unused SALEVENT_MOUSEACTIVATE stuff Change-Id: Ieb85872eca68621c6a7be47ff5dbea12f7690507 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
2015-11-24Vcl: Cleanup ToolboxSamuel Mehrbrodt2-122/+38
* Move defines to header file * Limit line length to 120 chars * Some other smaller cleanups (unused defines etc) Change-Id: I14b52579f9b5bae4ea0bc1df434cc3d29c223d4e Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Samuel Mehrbrodt <>
2015-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara1-2/+2
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-23establish that Virtual Devices either match Physical Device depth or ...Caolán McNamara1-1/+3
are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-20loplugin:defaultparamsNoel Grandin1-3/+1
Change-Id: Ia9dca11a7e38fcf2b7b4b0d2459c85a1348f8c43
2015-11-20Revert "vcl: Initial NotebookBar implementation."Samuel Mehrbrodt4-145/+14
Will use a different approach for NotebookBar. Also this should not be in 5.1. This reverts commit 8c1014021dbe9da2e18233d215b970f5359db67b. Change-Id: Ic699723818a890bf4c3be3a2c045527148bd118b Reviewed-on: Reviewed-by: Samuel Mehrbrodt <> Tested-by: Samuel Mehrbrodt <>
2015-11-20loplugin:sallogareasStephan Bergmann1-4/+4
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
2015-11-20tdf#95938 Toolbar context menu has no commandsSamuel Mehrbrodt3-11/+4
because of an integer overflow Change-Id: I75103450d0af59fd6f3196f451984e0dce45c693 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Samuel Mehrbrodt <>
2015-11-19Toolbar: Add 'Save As' to 'Save' dropdownSamuel Mehrbrodt1-0/+18
Change-Id: I6597ae5569b29d09a8c44fc9a55b71166aa37b05
2015-11-18Revert "ToolBox: Remove unused methods"Maxim Monastirsky2-0/+145
The ImplLoadRes method *is* used in ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId ). This change breaks the navigator panel, and therefore the JunitTest_toolkit_unoapi_1 test. This reverts commit 99648095012187ef284d0a9399a8e12878b2a370.
2015-11-18ToolBox: Remove unused methodsSamuel Mehrbrodt2-145/+0
Change-Id: Ic56cf27c61a904278770f0617d827e574d1eae68
2015-11-18Indentation fixesSamuel Mehrbrodt2-4/+2
Change-Id: Ib508e6f3c89266660e6163bbef2c7f50f5d01806
2015-11-18com::sun::star->css in vcl/Noel Grandin16-47/+44
Change-Id: Ifad76177673cf93746ba221838be80ff76fed228 Reviewed-on: Reviewed-by: Noel Grandin <> Tested-by: Noel Grandin <>