Paul Cornett
beffb32d2d
Avoid invalidating best size for foreground/background color change
2015-10-02 10:11:58 -07:00
Paul Cornett
8bceeba143
Show widget at GTK+ level regardless of "child visibility" status, see #17134 , #4343
2015-09-07 09:43:18 -07:00
Paul Cornett
9cfda3ca4d
IsShown() now returns false for non-selected wxNotebook pages, see #4343
2015-08-15 11:04:20 -07:00
Paul Cornett
bf6f3e35e8
Fix wxListBox mouse wheel scrolling with GTK3
...
Allow default handling for GDK_SCROLL_SMOOTH when we don't handle it. Closes #17097
2015-08-09 21:01:48 -07:00
Vadim Zeitlin
2509e7927a
Handle GTK_POLICY_EXTERNAL new in GTK+ 3.16 too.
...
Apparently this still doesn't display any scrollbars in the window itself, so
from our point of view it is equivalent to GTK_POLICY_NEVER.
2015-08-03 17:57:33 +02:00
Paul Cornett
b7cf54d24a
Avoid using gdk_window_freeze_updates() to implement Freeze()
...
Implement Freeze() by blocking the GtkWindow "expose-event"/"draw" signal
instead. Since the introduction of client-side windows in GTK+ 2.18,
gdk_window_freeze_updates() is unuseable because the impl_window (and thus the
update_freeze_count) for a given GdkWindow can change unpredictably. See #16795
2015-06-24 08:43:30 -07:00
Dimitri Schoolwerth
8f8d58d193
Use wx-prefixed macros throughout the repository.
...
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Paul Cornett
faf3e3d41f
Avoid freeze count mismatches with GTK 2.18+ when impl_window changes while frozen, see #16795
2015-04-17 08:46:16 -07:00
Vadim Zeitlin
35f5d0817a
Fix coordinates of wxSetCursorEvent in wxGTK.
...
The event coordinates remained in the client coordinates of the window the
initial event had been sent to, even when the event was propagated to its
parent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 15:05:29 +00:00
Paul Cornett
9bf0ccb2bf
More complete fix to avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu.
...
Any frozen window in the whole TLW could be affected, not just a child of the enabled window.
Also do a more complete search for scrollbars.
Closes #16795
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-12 06:12:16 +00:00
Paul Cornett
0081690355
build fix for __WXUNIVERSAL__
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:11:07 +00:00
Paul Cornett
78d0393cc0
avoid GDK assertion "impl_window->update_freeze_count > 0" on Ubuntu when enabling frozen window
...
closes #16795
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:05:15 +00:00
Paul Cornett
a2207b3c94
don't assume size-allocate implies a widget is realized
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 18:19:14 +00:00
Vadim Zeitlin
17135e0a77
Don't use X11-only functions when not using X11 in wxGTK.
...
See #16688 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 13:29:28 +00:00
Paul Cornett
dc555a92e3
notify all windows in capture stack about capture lost, and empty the stack
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-15 17:02:21 +00:00
Paul Cornett
00cc0233f6
fix releasing mouse capture before showing modal dialog, see #16647
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-14 18:56:37 +00:00
Paul Cornett
4d40e7806c
fix build with old pango versions which don't define PANGO_VERSION_CHECK(), closes #16660
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 18:31:21 +00:00
Paul Cornett
807a3091c0
avoid multiple emissions of the GtkAdjustment "changed" signal when configuring scrollbar
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 17:10:35 +00:00
Paul Cornett
a16a0e092d
invalidate cached client size when scrollbar visibility changes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 16:51:58 +00:00
Vadim Zeitlin
0c6f5c346d
Update mouse capture stack when showing modal dialog in wxGTK.
...
GTKReleaseMouseAndNotify(), which is called before showing a modal dialog in
wxGTK to ensure that the mouse does not remain captured by the window which
will be disabled by the modal dialog soon, should update the mouse capture
stack and so must call ReleaseMouse() to do it, not just DoReleaseMouse().
See #16647 , #8657 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-27 17:31:03 +00:00
Paul Cornett
a776eb65d0
Fix ClientToScreen()/ScreenToClient() when used immediately after window creation.
...
And whenever window does not have an up-to-date GTK size allocation.
Closes #16061
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 00:59:20 +00:00
Vadim Zeitlin
42fdb98f74
Don't prevent the other button release handlers from running in wxGTK.
...
There doesn't seem to be any advantage in doing this, but it can result in
problems see #16055 . So just always let the other handlers for this event
execute as well, even if we did process it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:12:40 +00:00
Paul Cornett
d0406f4606
Fix handling of identical consecutive key events
...
Events generated programmatically may have the same timestamp as the previous
event, which caused them to be ignored on the assumption that they were the same
event being sent to a parent window. Fix this by detecting when a new event could
be generated by the event loop.
Closes #15802
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-15 17:09:39 +00:00
Vadim Zeitlin
c29b6dfaf3
Avoid g++ warning about using possibly uninitialized PangoContext.
...
Initialize it to NULL as it could indeed be left uninitialized in some build
configurations before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 14:55:14 +00:00
Vadim Zeitlin
baf28b5fe3
Make wxGetPangoContext() work even without open display.
...
Use default Pango font map if we don't have any default screen in wxGTK.
Closes #16240 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-07 15:24:50 +00:00
Paul Cornett
a0f10ec1d6
Implement access to a global toplevel GdkWindow in a way that does not require always having an extra GtkWindow.
...
And don't use "RootWindow" in the name, it is not a root window in the X11 sense.
Also add wxGetPangoContext() to get access to a PangoContext.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-05 15:53:27 +00:00
Paul Cornett
6c6362401c
Delay GtkIMContext calls until widget is realized.
...
This may avoid a locking bug seen on Ubuntu which causes a deadlock.
See #16202
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-26 17:11:31 +00:00
Paul Cornett
5fa3e7866e
don't use Cairo functions when wxUSE_CAIRO==0
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 17:23:59 +00:00
Paul Cornett
f2e5faeb0a
fix invisible multi-line wxTextCtrl selection when custom foreground/background color is used with GTK3
...
closes #16176
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-10 15:57:28 +00:00
Paul Cornett
79b8852011
fix invisible wxTextCtrl selection when custom foreground/background color is used with GTK3
...
closes #16176
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-09 04:41:33 +00:00
Paul Cornett
5e6dd2fcb4
build fixes for wxUniversal
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 19:34:31 +00:00
Paul Cornett
d2e4b3520b
for GTK+ 3.6 and later, invalidate cached best size when GTK's style cache is updated, see #16088
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 18:44:02 +00:00
Vadim Zeitlin
2b5574c6ea
Make Move{Before,After}InTabOrder() work at any time in wxGTK.
...
These functions only worked if called at the beginning, before showing the
parent window containing the children whose TAB order was being adjusted,
because it didn't refresh the GTK+ TAB order on the correct window: we need to
do it for the parent of the window being moved, not this window itself.
Closes #16032 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 14:05:02 +00:00
Paul Cornett
daf5667de5
fix memory leak in SetFont with GTK3
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 18:43:56 +00:00
Paul Cornett
320a5da559
mimic wxMSW wxSetCursorEvent propagation behavior, closes #15801
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:14:48 +00:00
Paul Cornett
d35ca1d7aa
avoid forcing a paint on a window with zero size, see #15976
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:46:57 +00:00
Paul Cornett
8f97969383
add missing GTK3 implementations of GTKGetWindow()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 19:53:17 +00:00
Paul Cornett
1b131bf7e5
emit signal by id instead of name
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:36:15 +00:00
Paul Cornett
c51c65633b
Use "state-flags-changed" signal with GTK3, deprecated "state-changed" is ignored.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 16:49:35 +00:00
Paul Cornett
9d0d2b7e98
Fix wxSetCursorEvent handling
...
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
0dfeb74e78
Different fix for cursor inheritance and busy cursor/global cursor.
...
Previous work was not compatible with GTK < 2.18 and did not properly handle some cases
see #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Paul Cornett
95695c0a9f
don't avoid no-window widgets in GTKUpdateCursor()
...
it doesn't work for things like multi-line text control where m_widget is a no-window GtkScrolledWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
fd049a5465
restore non-default cursors in native widgets when unsetting wxCursor
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Paul Cornett
7b1f4ba70a
don't override non-default cursors in native controls when no wxCursor is set, a regression introduced by r75690
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00
Paul Cornett
9f09241cd0
Fix cursor inheritance and busy cursor/global cursor, closes #15801
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:27:13 +00:00
Vadim Zeitlin
482a131352
Don't eat mouse wheel events if we can't handle them in wxGTK.
...
The recent changes to mouse wheel scrolling broke it for the generic
wxListCtrl and probably any other situation in which scrollbars don't scroll
the window itself but some subwindow of it. In this case, the scroll wheel
event handler doesn't have any scrollbar to adjust, so it simply does nothing
and shouldn't return true, as it did since r74911.
Just return false in case we are not doing anything to let the mouse wheel
work as before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 13:33:37 +00:00
Paul Cornett
afab8b85c4
Go back to using a fixed value of 3 for lines/columns per action for mouse wheel event.
...
The native value is too large. Reverts the effect of r74805. Closes #15527
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:33:30 +00:00
Paul Cornett
ac687ddffb
fix vertical mouse wheel event rotation value, sign was reversed in r74805
...
fixes #15524
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 15:21:25 +00:00
Paul Cornett
8a1554ed3c
add support for GDK_SCROLL_SMOOTH mouse wheel event, introduced in GTK+ 3.4
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-14 18:15:42 +00:00
Paul Cornett
53f1a5b1bd
use native lines/columns per action for mouse wheel event
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-14 18:06:54 +00:00