Commit Graph

58 Commits

Author SHA1 Message Date
Paul Cornett
01223d6af2 Scrolling fixes for RTL layout with GTK3
Avoid some positioning hacks, they are not needed with GTK3
2021-01-31 21:06:18 -08:00
Scott Talbert
af4076865d Fix two-finger scrolling on wxGTK under Wayland
When running under Wayland and using two-finger scrolling, GTK seems to only
emit "smooth" scrolling events.  The code was already setup to handle
GDK_SCROLL_SMOOTH events - we just needed to add GDK_SMOOTH_SCROLL_MASK to the
event mast of the window in order to receive the events.

Fixes #17734.
2019-10-01 22:15:16 -07:00
Paul Cornett
0bcd7f9b51 Fix sizing of generic windows in wxToolBar with GTK+3.
Broken by ee0b07fc31. See #18269
2018-11-16 23:20:33 -08:00
Vadim Zeitlin
c0b0562533 Avoid many -Wparentheses warnings from gtk/gtk.h with gcc8
Add wx/gtk/private/wrapgtk.h wrapping gtk/gtk.h in pragmas disabling
these warnings and include it everywhere instead of directly including
gtk/gtk.h.

Also include wx/gtk/private/gtk2-compat.h from this wrapper header as it
was included by 90% of the files including gtk/gtk.h itself and it seems
to be better and simpler to just always include it.
2018-05-21 12:34:04 +02:00
Paul Cornett
2155eb2fde Fix generic wxWindow when used in toolbar
GtkToolbar uses item minimum size as actual size, so don't use 0 as minimum
for toolbar children.

See #17756, #17704
2016-12-21 10:25:32 -08:00
Paul Cornett
e0bcae1257 Allow initializing wxWidgets multiple times against one instance of GTK+, episode 3
See #17751
2016-12-18 08:11:59 -08:00
Paul Cornett
fbbc2170a6 Revert db9858a9 and 7d193c60, "Allow initializing wxWidgets multiple times"
See #17751
2016-12-16 23:37:48 -08:00
Paul Cornett
7d193c601d Allow initializing wxWidgets multiple times against one instance of GTK+, part 2
See #17751
2016-12-16 20:16:40 -08:00
Paul Cornett
db9858a93c Allow initializing wxWidgets multiple times against one instance of GTK+
See #17751
2016-12-15 19:37:12 -08:00
Paul Cornett
d5681ee4a8 Fix infinite sizing loop caused by 3b4ee5a0
Avoid the problems 3b4ee5a0 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
2016-12-09 21:38:35 -08:00
Paul Cornett
240f826185 Fix a sizing problem with GTK3 when wxPizza is the child of a native GTK widget
See #17704
2016-10-30 17:33:28 -07:00
Vadim Zeitlin
01ed444267 Avoid allocating empty size for wxGTK widgets
This suppresses warning messages from GTK+ (pixman to be more precise) if
there is really no space left for a widget and doesn't seem to have any ill
effects.

Closes #16996.
2016-02-27 02:41:18 +01:00
Paul Cornett
9fea81c069 Avoid "Gtk-WARNING **: Allocating size to ..." with GTK+ 3.19+ 2016-02-24 23:50:42 -08:00
Paul Cornett
69a13d973c Avoid "Gtk-WARNING **: State doesn't match"
See https://github.com/wxWidgets/wxWidgets/pull/232
2016-02-24 20:57:48 -08:00
Václav Slavík
7a25cf4932 Don't use the deprecated 'register' storage specifier.
It is not only useless with any modern C++ compiler, but also deprecated
in C++11.  Removing it fixes Clang warnings on the subject.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-19 17:23:02 +00:00
Paul Cornett
adeb914098 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Julian Smart
659d10cafe Allow for older GTK+ versions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-25 14:55:48 +00:00
Vadim Zeitlin
4775836d37 Avoid problems when reparenting a TLW under a child in wxGTK.
Don't use a TLW with gtk_fixed_put().

Closes #15237.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-10 15:53:04 +00:00
Paul Cornett
9dc44eff02 support for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 20:39:06 +00:00
Paul Cornett
3b7067a05d Remove use of "size-request" signal for wxWindow sizing.
This signal has been removed from GTK3. Instead have wxPizza keep track of child
size, and use gtk_widget_set_size_request() for wxWindows in native containers.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-17 15:29:50 +00:00
Vadim Zeitlin
e762ef8f53 Fix precompiled headers use with MSVC in wxGTK sources.
Don't use PCH for C sources, do include wx/wxprec.h from all wxGTK C++
sources.

Closes #14224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:48 +00:00
Paul Cornett
030f4112fc handle theme change which changes window border width
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-31 07:30:11 +00:00
Paul Cornett
5073caddb1 must use deprecated function for gtk2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-29 17:49:36 +00:00
Václav Slavík
fc9ab22a76 Use accessor functions instead of deprecated GTK+ macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-26 15:49:57 +00:00
Paul Cornett
6e7cf3bd5b invalidate border area when showing or hiding a pizza widget, fixes #12174
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-25 04:31:45 +00:00
Paul Cornett
375efc1fce Remove pizza backing window.
When it is present, no-window widgets sometimes don't get expose events for
reasons I could not determine. And it is dubious that it improved scrolling
performance on modern hardware anyway, and almost certainly doesn't help now
that GTK+ is using "client side windows".


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-30 06:38:28 +00:00
Paul Cornett
f089940f68 Reverse hierarchy of wxPizza GdkWindows
widget->window must be topmost in order for GTK+ to calculate DND drop coordinates correctly
fixes #11834


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 01:16:06 +00:00
Vadim Zeitlin
a8d4e18d33 No real changes, just remove an unused variable.
This fixes a warning from IRIX mipsPro compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-02-28 11:08:46 +00:00
Paul Cornett
1827c0f538 remove m_backing_window member, to keep people from trying to use it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 17:16:28 +00:00
Paul Cornett
0f52f61085 remove unused data member
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:23:48 +00:00
Julian Smart
ec2d6790e9 Fixed wxBORDER_THEME breakage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 10:58:06 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Robert Roebling
55ca41b1ea Store pointer to owning wxWindow in wxPizza widget
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-29 22:32:25 +00:00
Robert Roebling
1c1e6b5b50 Don't pretend to be a GtkTreeView where it isn't required
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-23 23:40:48 +00:00
Robert Roebling
1831914337 Not calling _size_allocate() breaks a.o. the native wxDataViewCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-23 13:54:15 +00:00
Robert Roebling
6063039441 Prevent surplus calls of _size_allocate() if no change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-23 13:04:17 +00:00
Robert Roebling
981a80493a Tried hard to get the selection/focus rectangle drawn right. The GTK+ theme API is beyond repair.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-23 11:37:54 +00:00
Robert Roebling
d7b63a01e9 Trying again to improve border type guessing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-22 15:05:32 +00:00
Robert Roebling
06a4274546 Try to be smarter about querying the border witdh
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-22 13:33:42 +00:00
Robert Roebling
eb56793e26 Update allocation of all child widgets after scrolling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 12:29:46 +00:00
Paul Cornett
bff035cf5a build fix for GTK+ 2.12 and earlier
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 16:59:00 +00:00
Paul Cornett
7456fe19dd do minimal invalidations to get border to redraw properly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 05:26:25 +00:00
Robert Roebling
e66a89eda9 Avoid redraw artifacts from the border after resizing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-25 20:40:24 +00:00
Paul Cornett
75f661bbc8 simplify wxPizza a bit by always drawing the border on parent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-16 18:31:19 +00:00
Vadim Zeitlin
e8759560f8 add wxRenderer::GetCheckBoxSize(); refactor wxGTK code to avoid duplication (#9642)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-02 21:51:22 +00:00
Paul Cornett
a899707131 fix child window redraw glitches during scrolling (bug 1944002)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-20 22:44:17 +00:00
Václav Slavík
bbd92d1dbe moved win_gtk.h header to wx/gtk/private, it's for internal use only
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-22 13:24:05 +00:00
Paul Cornett
4eccf53dd5 Make sizing logic clearer, at the expense of a few duplicated lines.
Use NULL for pointer parameter instead of None.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-17 01:57:14 +00:00
Robert Roebling
69fdd54eeb Disable any refresh in backing window (set_back_pixmap( None ..) makes it transparent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-16 23:53:09 +00:00