Commit Graph

1011 Commits

Author SHA1 Message Date
Paul Cornett
a050652c6a Use "notify::gtk-theme-name" from GtkSettings to generate wxSysColourChangedEvent
"style-updated" occurs frequently for other reasons, such as switching focus between TLWs

(cherry picked from commit 61c8a7ca60)
2016-12-13 09:07:50 -08:00
Paul Cornett
b2854a20de Avoid generating scroll event when our scrollbar is disabled by other software
webkitgtk apparently manipulates our scrollbar GtkAdjustment directly, setting
all members to zero to disable it. Since we never do that, those values were
unexpected. This is a better fix for the problem papered over by 45d66f592

(cherry picked from commit ccd1d40dd9)
2016-12-12 10:55:54 -08:00
Paul Cornett
309f5fe529 Fix infinite sizing loop caused by 64753769
Avoid the problems 64753769 attempted to address in a much simpler way:
when a "size-allocate" is in progress, call gtk_widget_size_allocate()
directly, rather than deferring a call to gtk_widget_queue_resize().
See #17585

(backport of d5681ee4a8)
2016-12-09 21:43:54 -08:00
Paul Cornett
553ec7537c Fix non-default window background color with GTK+ >= 3.20
GTK+ no longer automatically paints non-default window background. See #17586

(cherry picked from commit 9bb5d0435a)
2016-11-09 20:07:57 -08:00
Paul Cornett
2241f97775 Avoid calling ScreenToClient() on invisible window while processing wxSetCursorEvent
(cherry picked from commit b47319d515)
2016-11-05 19:46:07 -07:00
Paul Cornett
49be360eab Avoid assert dialog in ClientToScreen()/ScreenToClient(), it's just too annoying
(cherry picked from commit e3f117c4f3)
2016-11-03 09:41:48 -07:00
Paul Cornett
cd8811bf14 Fix paint clipping region with GTK+ >= 3.20
Apparently the clip is no longer set properly. Fixes wxDC::Clear() overwriting
areas outside the window. Problem can be seen in the Audacity toolbars.

(cherry picked from commit bca7313499)
2016-11-03 09:41:07 -07:00
Paul Cornett
4206e4ce1c Partial workaround for stale styling information with GTK3
We can trigger size events when we know the style cache has been updated.
See #16088

(backport of 101c43d0aa)
2016-11-02 10:46:57 -07:00
Paul Cornett
6475376931 Fix some sizing problems with GTK3
A change in size-allocate handling with GTK+ 3.20 exposed a flaw in our method for
deferring queue-resize requests. Using an idle callback to process the requests
did not work well with the GdkFrameClock-based system used since GTK+ 3.8. Using
the "check-resize" signal works better. Also with GTK+ >= 3.20, it seems necessary
to manually work the queue-resize up to the TLW, as otherwise the resized widgets
don't get updated without an external size-allocate event.
See #17585

(backport of 3b4ee5a031)
2016-11-02 10:30:44 -07:00
Paul Cornett
786f778b71 Save and restore GtkStyleContext in a few places that were not doing it
Does not fix any known problem, but seems prudent

(backport of 5d04f41d47)
2016-08-31 10:39:57 -07:00
Paul Cornett
7afbdcd534 Avoid "Gtk-WARNING **: State doesn't match"
See https://github.com/wxWidgets/wxWidgets/pull/232
(backport of 69a13d973c)
2016-02-24 21:20:08 -08:00
Tim Kosse
6f5b629f2f Don't assert if Ctrl+Tab is pressed inside a wxGTK window
Ignore the WinChange flag in DoNavigateIn() to fix an assertion that happened
when pressing Ctrl+Tab with the generic wxListCtrl having focus.

This seems to be consistent with pressing Ctrl+Tab elsewhere, e.g. when
cycling between buttons in a dialog.

(this is a backport of f3cd79984f2936a4148964af8c23cd42aab6a871 from master)
2016-01-14 15:49:46 +01:00
Paul Cornett
6f6bad4702 Avoid invalidating best size for foreground/background color change
(cherry picked from commit beffb32d2d)
2015-10-02 10:13:35 -07:00
Paul Cornett
ef1c614df8 Show widget at GTK+ level regardless of "child visibility" status, see #17134, #4343
(cherry picked from commit 8bceeba143)
2015-09-07 09:44:40 -07:00
Paul Cornett
51e766093e IsShown() now returns false for non-selected wxNotebook pages, see #4343 2015-08-15 11:09:03 -07:00
Paul Cornett
20448fbcd3 Fix wxListBox mouse wheel scrolling with GTK3
Allow default handling for GDK_SCROLL_SMOOTH when we don't handle it. Closes #17097

(cherry picked from commit bf6f3e35e8)
2015-08-09 21:05:10 -07:00
Vadim Zeitlin
adf521dea2 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.

(cherry picked from commit 2509e7927a)
2015-08-04 20:05:04 -07:00
Paul Cornett
4db8d55913 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:42:49 -07:00
Paul Cornett
69c7a8c405 backport mouse capture fixes 00cc023 and dc555a9
00cc023 "fix releasing mouse capture before showing modal dialog"
dc555a9 "notify all windows in capture stack about capture lost, and empty the stack"
closes #16647
2015-05-13 10:13:49 -07:00
Paul Cornett
0c02b05d92 Avoid freeze count mismatches with GTK 2.18+ when impl_window changes while frozen, see #16795 2015-04-17 08:45:55 -07:00
Vadim Zeitlin
e22fcf204e 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/branches/WX_3_0_BRANCH@78488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-14 15:04:55 +00:00
Paul Cornett
edc127ed8d 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/branches/WX_3_0_BRANCH@78479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-12 06:12:16 +00:00
Paul Cornett
e88904ccad build fix for __WXUNIVERSAL__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:11:07 +00:00
Paul Cornett
66780715c0 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/branches/WX_3_0_BRANCH@78474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-11 18:05:15 +00:00
Paul Cornett
e19a2263bd don't assume size-allocate implies a widget is realized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-09 18:19:14 +00:00
Paul Cornett
4dccdf3749 fix crashes in wxGTK3 when running with non-X11 backend, see #16688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-20 17:04:13 +00:00
Paul Cornett
c84463ac38 avoid multiple emissions of the GtkAdjustment "changed" signal when configuring scrollbar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 17:10:35 +00:00
Paul Cornett
8c7fc09b2b invalidate cached client size when scrollbar visibility changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 16:51:58 +00:00
Paul Cornett
9f6f5ab4f5 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/branches/WX_3_0_BRANCH@78033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-19 00:59:20 +00:00
Vadim Zeitlin
b251e53887 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/branches/WX_3_0_BRANCH@77896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 16:15:05 +00:00
Paul Cornett
aac2fa1f5b fix use of stack variable after it has gone out of scope, closes #16423
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-18 17:02:53 +00:00
Paul Cornett
b6f7b079c6 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/branches/WX_3_0_BRANCH@77074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-15 17:09:39 +00:00
Paul Cornett
97043cef22 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/branches/WX_3_0_BRANCH@76398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-26 17:11:31 +00:00
Paul Cornett
7f2dcffd52 don't use Cairo functions when wxUSE_CAIRO==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 17:23:59 +00:00
Paul Cornett
6f4edd56af 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/branches/WX_3_0_BRANCH@76308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-10 15:57:28 +00:00
Paul Cornett
4b227b8b8d 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/branches/WX_3_0_BRANCH@76307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-09 04:41:33 +00:00
Paul Cornett
eb789bbf06 build fixes for wxUniversal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 19:34:31 +00:00
Paul Cornett
d737ca76bd 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/branches/WX_3_0_BRANCH@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 18:44:02 +00:00
Vadim Zeitlin
96430b3f3d 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/branches/WX_3_0_BRANCH@76100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 14:03:33 +00:00
Paul Cornett
9dcdf05c8d fix memory leak in SetFont with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 18:43:56 +00:00
Paul Cornett
3d4213b512 mimic wxMSW wxSetCursorEvent propagation behavior, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:14:48 +00:00
Paul Cornett
3354ddc8f9 avoid forcing a paint on a window with zero size, see #15976
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:46:57 +00:00
Paul Cornett
5c8ad94705 add missing GTK3 implementations of GTKGetWindow()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 19:53:17 +00:00
Paul Cornett
01ee6284c9 emit signal by id instead of name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:36:15 +00:00
Paul Cornett
d4329a4390 Use "state-flags-changed" signal with GTK3, deprecated "state-changed" is ignored.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 16:49:35 +00:00
Paul Cornett
2fe16c1aad 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/branches/WX_3_0_BRANCH@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
6d9817ea26 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/branches/WX_3_0_BRANCH@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Paul Cornett
ccd6a5fa0e 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/branches/WX_3_0_BRANCH@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
602d813a40 restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Paul Cornett
f883c7783e 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/branches/WX_3_0_BRANCH@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00