summaryrefslogtreecommitdiff
path: root/gtk
Commit message (Collapse)AuthorAgeFilesLines
* Use stupid quotes instead of dumb quotesMatthias Clasen2015-09-2321-121/+121
| | | | | | Following a similar change in GLib a while ago. 'bla' may by stupid, but it looks less dumb than `bla'.
* container: Use qdata for focus chainMatthias Clasen2015-09-231-18/+11
|
* widget: Add a few more inlined gettersMatthias Clasen2015-09-233-48/+62
|
* size group: Streamline disposalMatthias Clasen2015-09-232-17/+13
| | | | | Remove widgets from their size groups in dispose, without connecting to ::destroy. The signal handler is not necessary.
* size request: Avoid unnecessary reffingMatthias Clasen2015-09-231-4/+0
| | | | | | There is no particular reason why we should have to ref the widgets if they are in a size group - we are not reffing them in the simple case either.
* size group: streamline iteration slightlyMatthias Clasen2015-09-231-35/+24
| | | | | | | Instead of handling the horizontal and vertical peers separately (and often, duplicatively), collect all peers in one go. At the same time, avoid creating and destroying hash tables more often than necessary.
* inspector: Ellipsize the accessible nameMatthias Clasen2015-09-231-0/+2
| | | | It can be long, and we don't want the inspector to grow excessively.
* text view: Use qdata with preallocated quarksMatthias Clasen2015-09-231-18/+16
|
* entry: Use qdata with preallocated quarksMatthias Clasen2015-09-231-10/+13
|
* label: Avoid recalculation in some casesMatthias Clasen2015-09-231-12/+20
| | | | Avoid recalculation the entire label layout when nothing changed.
* scale: Drop unneeded private exportsMatthias Clasen2015-09-233-82/+32
| | | | | Nobody outside gtkscale.c is using these functions, so make them static.
* assistant: Drop unneeded callsMatthias Clasen2015-09-231-3/+0
| | | | | GtkAssistant is just a regular composite widget nowadays, no need to manually queue resizes.
* style context: Trivial refactorMatthias Clasen2015-09-231-13/+2
| | | | Use g_set_object for setting the frame clock.
* app chooser widget: protect against show_allMatthias Clasen2015-09-221-0/+1
| | | | | | | The visibility of the 'no apps' placeholder is managed by the dialog, it should not be affected by gtk_widget_show_all. https://bugzilla.gnome.org/show_bug.cgi?id=748080
* app chooser: Avoid duplicatesMatthias Clasen2015-09-221-1/+1
| | | | | | | | | | At the time we populate the model "initially" in constructed(), it has already been filled and cleared a couple of times (we do that every time one of the construct properties gets set). So we can't assume that the model is empty, and have to clear it first. Otherwise, we add duplicates to the list. https://bugzilla.gnome.org/show_bug.cgi?id=748080
* places view: fix a crash in finalizeMatthias Clasen2015-09-211-5/+6
| | | | Fix a GtkPlacesView crash in the test suite, _again_.
* flow box: Fix up docsMatthias Clasen2015-09-211-0/+1
|
* widget: get_widget_windows() don't modify window child listsAlexander Larsson2015-09-211-3/+2
| | | | | We can't modify the lists returned from gdk_window_peek_children, instead use get_children().
* widget: Make sure we only run controllers on realized widgetsCarlos Garnacho2015-09-211-0/+3
| | | | | | | | The default event bubbling paths are prone to just running event controllers even after the widget was potentially unrealized/destroyed in an event handler callback, so bail out early if that's the case. https://bugzilla.gnome.org/show_bug.cgi?id=755352
* gesture: strengthen against destroyed windowsCarlos Garnacho2015-09-211-1/+5
| | | | | | | Bail out when we receive an event with an already destroyed window, we'll hopefully get reset/cancelled afterwards on grab broken events. https://bugzilla.gnome.org/show_bug.cgi?id=755352
* window: cancel unclaimed sequences after GtkEventController::handle_event.Carlos Garnacho2015-09-211-12/+26
| | | | | | | | | | | | | | | | | | | To GtkGesture machinery, if an event triggers a controller/gesture signal, and gesture reset/cancellation as a result, the event has been managed after all. Commit e3bd895667 effectively changed the return value of the wrapping gtk_event_controller_handle_event() function, which broke some paths (eg. gtk_popover_button_press() wouldn't while the GTK+ grab was active for this reason because the button press event was consumed early on gtk_window_check_handle_wm_event()). That patch is not too off-track given potential child widgets' behavior, we want nonetheless to distinguish the denied vs cancelled paths here (because GtkWindow itself relies on the GtkGesture behavior described in the first paragraph on the begin_move/resize paths), so just reset gestures after the event has already gone through the GtkEventController so the return value is unaffected.
* Revert "gtkwidget: Ensure unrealization during event dispatching cancels ↵Carlos Garnacho2015-09-181-32/+2
| | | | | | gestures" This reverts commit 13873d2c507783042df55ad2c48f37a346121fd0.
* Revert "widget: Fix propagation of gesture cancellation on widget ↵Carlos Garnacho2015-09-181-8/+4
| | | | | | unrealize/destroy" This reverts commit 3aaf730901d04a3e4a102cb95e769a48ec5027e3.
* Revert "widget: Cancel also denied sequences"Carlos Garnacho2015-09-181-0/+3
| | | | This reverts commit 63e255e7b5326888e83bf84f1147012938c81000.
* window: Reset on unhandled gestures right awayCarlos Garnacho2015-09-181-0/+9
| | | | | | | | | | | | | | | | | Traditionally a sequence is set to GTK_EVENT_SEQUENCE_DENIED state when it is to be ignored, which means it is dormant, but still managed by the gesture (accounting, "denied" sequences still make "slots" in multitouch gesture busy, etc...). This gesture will run for all button presses and releases in the window though when presses happen on the "window content" region, and we can't account for every children to be as educated as setting the proper mask on every window, or ensuring events will be propagated as they should. In order to cater for this, just reset the gestures, we can live without such accounting in these specific GtkGestureSingle gestures. https://bugzilla.gnome.org/show_bug.cgi?id=754098
* pixelcache: use factor instead of marginChristian Hergert2015-09-161-6/+6
| | | | | | Instead of using a fixed size, use a factor of the surface size. This helps in situations where animations of surrounding widgets are used and cause a rapid rate of surface destroy/create cycles.
* widget: Cancel also denied sequencesCarlos Garnacho2015-09-161-3/+0
| | | | | | | | | It makes no sense to skip denied sequences here, the gestures are still carrying out the accounting for these, which must be also put to an end if we're possibly not receiving any further events from this sequence. https://bugzilla.gnome.org/show_bug.cgi?id=754098
* widget: Fix propagation of gesture cancellation on widget unrealize/destroyCarlos Garnacho2015-09-161-4/+8
| | | | | | | | | | At the time event_check_cancel_sequence_on_hierarchy() is called, the widget has been already unparented. Given the widget itself is being destroyed, cancellation on it is impending in one way or another, we still must propagate cancellation across all parents, so retrieve it early before possible widget destruction. https://bugzilla.gnome.org/show_bug.cgi?id=754098
* scrolledwindow: Set the scrollbar as "over" immediately during slider grabsCarlos Garnacho2015-09-161-2/+9
| | | | | | | | | | | | Otherwise it's attempted through a timeout, which gets cancelled early after, and the slider disappears after a while with no mouse activity despite the ongoing implicit grab. Once the grab is finished, check_update_scrollbar_proximity() will be called again on both scrollbars, and the fade out animation will be triggered as a result. https://bugzilla.gnome.org/show_bug.cgi?id=754745
* file chooser: Avoid a crashMatthias Clasen2015-09-161-7/+16
| | | | | | | | | When right-clicking in an empty folder, you should get a context menu, not a crash. The code for positioning the popover was not handling the eventuality of no row under the pointer. Just position the popover right at the click location in this case. https://bugzilla.gnome.org/show_bug.cgi?id=755021
* widget path: Don't leak sibling pathsMatthias Clasen2015-09-151-0/+2
|
* css shadows: Cache blured masks for the corners of outset shadowsAlexander Larsson2015-09-151-2/+117
| | | | | | | | | | A lot of time was spend rendering the shadows on windows with CSD, in particular the corner pieces, since they are the largest parts. This patch catches this particular case and caches the pre-rendered blur masks. This makes the shadow code go from 25% to 8% of the time when resizing gtk3-demo.
* css shadows: Break out side & corner shadows into helper functionsAlexander Larsson2015-09-151-80/+115
| | | | This changes nothing, but makes the code a bit easier to read
* ui: Remove border from dialogs againTimm Bäder2015-09-154-0/+4
|
* MSVC Builds: Massive Rename of ProjectsChun-wei Fan2015-09-151-8/+8
| | | | | | | | | | | | We need to rename the projects so that when these projects are added into an all-in-one solution file that will build the GTK+ 2/3 stack, the names of the projects will not collide with the GTK+-2.x ones, especially as GTK+-2.x and GTK+-3.x are done to co-exist on the same system. This is due to the case that the MSVC projects are directly carried over from the GTK+-2.x ones and was then updated for 3.x. We still need to update the GUIDs of the projects, so that they won't conflict with the GTK+-2.x ones.
* build: Clean Up Visual Studio Project GenerationChun-wei Fan2015-09-151-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | Use the common automake module from the previous commit in the Makefile.am's, which means that the Makefile.am's in gdk/ and gtk/ can be cleaned up as a result. As a side effect, the property sheet that is used to "install" the build results and headers can now be generated in terms of the listing of headers to copy during 'make dist', where we can acquire most of the list of headers to "install", so that we can largely avoid the situation where the property sheet files are not updated in time for this, causing missing headers when this build of GTK+ is being used. Also use the Visual Studio Project file generation for the following projects: gtk3-demo gtk3-demo-application gtk3-icon-browser gdk-win32 gdk-broadway gail-util So that the maintenace of these project files can be simplified as well. https://bugzilla.gnome.org/show_bug.cgi?id=681965
* window: Use gtk_widget_queue_resize()Benjamin Otte2015-09-142-3/+3
| | | | | | _gtk_container_queue_resize() is a private function and probably shouldn't have even been used in 1999 when this call was originally added.
* inspector: Store the parent for the object treeBenjamin Otte2015-09-141-2/+13
| | | | | | This allows selecting newly added random objects. https://bugzilla.gnome.org/show_bug.cgi?id=754987
* Revert "print backend: Remove an unneeded variable"Matthias Clasen2015-09-141-1/+5
| | | | | | | This reverts commit 9ebebd48b00092446cdbeee03b49f149725c9868. This change broke the templates testcase, and I don't have time to poke at why, right now.
* Fix a copy-paste errorMatthias Clasen2015-09-141-1/+1
| | | | | We were notifying can-focus when can-default changes. Unit tests save the day.
* scrolledwindow: Cancel kinetic/overshoot animation on captured scroll eventsCarlos Garnacho2015-09-141-1/+6
| | | | | | | This ensures the animation is cancelled if the child widget happens to GDK_EVENT_STOP scroll events. https://bugzilla.gnome.org/show_bug.cgi?id=745315
* entry: Drop the Ctrl-K keybindingMatthias Clasen2015-09-141-4/+0
| | | | | This interferes with a well-loved firefox shortcut, and we are more interested in a gtk3 firefox than in legacy keybindings.
* gtkwidget: Do not listen to notifications from nonexistent propertiesCarlos Garnacho2015-09-141-13/+0
| | | | | | | The GtkEventController event mask is private, and set early by GtkGesture implementations. Being this private data, there is no corresponding property, so this code is a no-op, there is just no need to listen to changes there.
* gtkwidget: Ensure unrealization during event dispatching cancels gesturesCarlos Garnacho2015-09-141-2/+32
| | | | | | | | | | | | We use to rely on grab broken events for most of the event sequence lifetime, this breaks though on GDK_BUTTON_RELEASE/GDK_TOUCH_END, as there's no longer a grab at that time. For these cases (and all others where there's destroy/unrealize calls involved during event dispatching), catch this on the late WIDGET_REALIZED_FOR_EVENT calls on widget event handling functions. https://bugzilla.gnome.org/show_bug.cgi?id=754098
* gtkwidget: refactor code into separate functionCarlos Garnacho2015-09-141-15/+23
| | | | | | | This "cancel sequence across widget hierarchy" code will be useful in other places, so take it out to a separate function. https://bugzilla.gnome.org/show_bug.cgi?id=754098
* Revert "tool button: Use G_DEFINE_TYPE"Matthias Clasen2015-09-141-15/+54
| | | | | | | This reverts commit 4e56dfad0e33187d019c44ecfb5e7e99cf2da535. It turns out that GtkToolButton is playing games with the class pointer inside instance_init, so leave it alone.
* gtk-builder-tool: Don't break GtkHBox and GtkVBoxMatthias Clasen2015-09-141-0/+2
| | | | | | These classes have different defaults for ::expand than GtkBox, which is not reflected in the declared default, so we have to blacklist it.
* widget: Call size_allocate vfunc directly when possibleAlexander Larsson2015-09-141-1/+4
| | | | This avoids all the overhead of signal emissions when it is not used.
* draw: call vfunc rather then emit signal for the common caseAlexander Larsson2015-09-141-3/+12
| | | | | | | | | This avoids a lot of overhead in the common case where a signal is not connected and we're just using the class vfunc (which is true for all in-libgtk widgets). Additionally it makes backtraces in debuggers and profiles much much nicer to look at. https://bugzilla.gnome.org/show_bug.cgi?id=754986
* gtk: Stop setting GDK_EXPOSURE_MASK on random widgetsAlexander Larsson2015-09-1424-38/+26
| | | | | | | | | | | | | | These days exposure happens only on the native windows (generally the toplevel window) and is propagated down recursively. The expose event is only useful for backwards compat, and in fact, for double buffered widgets we totally ignore the event (and non-double buffering breaks on wayland). So, by not setting the mask we avoid emitting these events and then later ignoring them. We still keep it on eventbox, fixed and layout as these are used in weird ways that want backwards compat.