summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
Commit message (Collapse)AuthorAgeFilesLines
* window: Create a GtkConstraintSolverEmmanuele Bassi2019-06-271-0/+16
| | | | Implement the GtkRoot getter for GtkConstraintSolver.
* window: Fix the default value of mnemonics-visibleMatthias Clasen2019-06-231-1/+1
| | | | | They aren't visible, so why should the property be TRUE?
* widget: Add parameter type back to install_actionMatthias Clasen2019-06-221-1/+1
| | | | Adapt all callers.
* window: CosmeticsMatthias Clasen2019-06-211-7/+7
|
* Build fixMatthias Clasen2019-06-201-2/+1
|
* Fix initial mnemonic visibilityMatthias Clasen2019-06-211-10/+1
| | | | We were showing mnemonics initially, which is not desired.
* main: Move visible mnemonics handlingMatthias Clasen2019-06-211-2/+49
| | | | | No need to special-case this anymore; we can use a regular event controller in GtkWindow for this.
* main: Move visible focus handlingMatthias Clasen2019-06-211-0/+15
| | | | | No need to special-case this anymore; we can use a regular event controller in GtkWindow for this.
* Window: Hyperlink to GtkBuildable from its sectionDaniel Boles2019-06-181-2/+2
|
* window: Use the new action machineryMatthias Clasen2019-06-181-23/+11
| | | | | Change the default.activate action to use the new action machinery.
* window: Fix focus wraparoundMatthias Clasen2019-06-111-2/+4
| | | | | If tab focus falls off the end, and we have an empty headerbar, we end up with window->focus == NULL. Don't let that happen
* Add gtkmenubarprivate.hMatthias Clasen2019-06-011-1/+1
| | | | Move private api into a private header.
* Merge branch 'gesture-click' into 'master'Matthias Clasen2019-05-291-14/+14
|\ | | | | | | | | Rename GtkGestureMultiPress to GtkGestureClick See merge request GNOME/gtk!878
| * Rename GtkGestureMultiPress to GtkGestureClickMatthias Clasen2019-05-291-14/+14
| | | | | | | | | | The name just made it hard for people to find the right gesture to use.
* | CosmeticsMatthias Clasen2019-05-291-3/+0
| | | | | | | | Remove an unused variable.
* | window: Remove move unused fieldsMatthias Clasen2019-05-291-15/+0
| | | | | | | | position_constraints_changed is never used.
* | window: Never call gdk_surface_moveMatthias Clasen2019-05-291-19/+10
| | | | | | | | | | | | | | | | With gtk_window_set_position gone, we should never come up with a new position to set in this code. Leave a warning in place and remove the gdk_surface_move calls.
* | Drop an empty functionMatthias Clasen2019-05-291-87/+6
| | | | | | | | | | gtk_window_constrain_position is not doing anything anymore, so no need to call it.
* | window: Drop more unused fieldsMatthias Clasen2019-05-291-9/+0
| | | | | | | | need_default_position is never used.
* | window: Drop some unused fieldsMatthias Clasen2019-05-291-23/+1
| | | | | | | | initial_x/y and initial_pos_set are never used.
* | window: Drop gtk_window_set_positionMatthias Clasen2019-05-291-280/+10
|/ | | | | This is heavily using global coordinates, and can't be guaranteed to work across wms / platforms.
* Revert "window: Chain up in show/hide"Benjamin Otte2019-05-291-3/+4
| | | | This reverts commit 863f4d13ff4b46c55ff2111958ca2629c95caf99.
* window: Chain up in show/hideBenjamin Otte2019-05-291-4/+3
|
* Don't assume that gdk_surface[_move]_resize() is asynchronousРуслан Ижбулатов2019-05-281-23/+29
| | | | | | | | On Windows that call resizes the native window immediately, and the corresponding GDK event is emitted and processed before the control is returned to gtk_window_move_resize(). Therefore, update freeze and configure_request_count increment must happen before the call, not after it.
* Avoid compiler warningsMatthias Clasen2019-05-281-1/+6
| | | | Avoid priv being flagged as unused on win32.
* Stop using gtk_widget_is_toplevelMatthias Clasen2019-05-281-47/+0
|
* Stop using gtk_widget_get_surfaceMatthias Clasen2019-05-281-197/+118
| | | | | Replace all uses of gtk_widget_get_surface by gtk_native_get_surface.
* window: Make unrealize work againMatthias Clasen2019-05-281-2/+3
| | | | | | GtkWidgets unrealize accesses the frame clock of the surface, so we need to keep the surface in place until after we've chained up.
* Drop gtk_widget_set_surfaceMatthias Clasen2019-05-281-2/+0
| | | | Not used anymore. Only GtkNative's have surfaces.
* Work toward dropping widget->surfaceMatthias Clasen2019-05-281-5/+8
| | | | | | Drop special-casing of GtkNative in most widget vfuncs. GtkNative implementations need to override these anyway.
* Remove gtk_widget_get/set_has_surfaceMatthias Clasen2019-05-281-2/+0
| | | | | These serve no purpose anymore - widgets don't have surfaces, unless they're a GtkNative.
* window: Don't inherit cursors across surfacesMatthias Clasen2019-05-281-0/+4
| | | | | | | I can't think of a case where this is the desired behavior. So, instead of setting an explicit cursor on all popups, just stop walking the parents at surface boundaries.
* Rename surface constructorsMatthias Clasen2019-05-281-1/+1
| | | | | | | | | | | We want to use a gdk_surface_new_popup for popups, and align the constructor names with the surface types, so rename gdk_surface_new_popup -> gdk_surface_new_temp gdk_surface_new_popup_full -> gdk_surface_new_popup The temp surface type will disappear eventually.
* window: Stop using gtk_widget_register_surfaceMatthias Clasen2019-05-281-9/+51
| | | | | The GtkRoot implementations are expected to handle the necessary surface setup themselves, going forward.
* Reimplement GtkPopoverMatthias Clasen2019-05-281-0/+2
|
* Review and replace uses of get_toplevelMatthias Clasen2019-05-281-1/+1
| | | | | | | | Now that roots can have parent widgets, we need to carefully examine all calls of gtk_widget_get_toplevel, and replace them with gtk_widget_get_root if we want the nearest root, and not the ultimate end of the parent chain.
* Use GtkNative APIs instead of GtkRootMatthias Clasen2019-05-281-16/+0
|
* window: Implement GtkNativeMatthias Clasen2019-05-281-7/+52
| | | | Adapt GtkWindow to implement both GtkRoot and GtkNative.
* window: Remove unneeded variableBenjamin Otte2019-05-211-5/+2
| | | | | The variable would show up as a gcc warning in builds without X11 support.
* Reinstate the activate-focus keybindingMatthias Clasen2019-05-121-0/+11
| | | | | | | | | Commit 3b62d9c027186fe0fddfb9 was a bit overzealous in removing not just the public API for activating the focus widget, but also the plumbing needed to make the keybinding work. Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1879
* window: Stop duplicating focus change eventsMatthias Clasen2019-05-041-67/+5
| | | | | | | | | | | | | | | | We had code in gtkwindow.c that generated duplicate, and defective, focus-change events, in the following way: - gtkmain.c generates a chain of focus-change events for moving focus from one window to another - gtkwindow.c catches a focus-in event in the middle of this chain and sets itself as 'active' - and then it proceeds to generate focus-change events towards its own focus widget without a related target This is not necessary since we gtkmain.c already generates a complete sequence of focus-change events. So stop doing it.
* window: Make _gtk_window_set_is_active staticMatthias Clasen2019-05-041-2/+4
| | | | It is not used outside gtkwindow.c.
* window: Implement display change via root/unrootMatthias Clasen2019-05-011-1/+3
| | | | | | | | Export gtk_widget_root/unroot privately, make them work on roots, and use them in gtk_window_set_display. This gets us to a single way to listen for display changes, the root property.
* window: Prevent resize cursors from stickingMatthias Clasen2019-04-301-1/+4
| | | | | | | | | | | | When a modal dialog is smaller than its parent, we were keeping the resize cursor from the dialogs edge all over the parent window, which looks really irritating, since the resize cursors are closely associated with the window edge. Fix this by falling back to the default cursor outside the grab widgets surface. Closes: https://gitlab.gnome.org/GNOME/gtk/issues/23
* window: Set cursor on the right surfaceMatthias Clasen2019-04-291-2/+4
| | | | | | | | | Set the cursor on the surface of the target widget, not the surface of some of its parents. This does not make a difference currently. But it will in the future, when we have parented widgets with surfaces.
* Drop the can-default propertyMatthias Clasen2019-04-281-6/+1
| | | | | | It was added at a time when default buttons had a very large external border that would disrupt aligment. Not a problem nowadays.
* Stop using gtk_widget_grab_defaultMatthias Clasen2019-04-281-4/+2
| | | | Replace gtk_widget_grab_default by gtk_window_set_default_widget.
* Drop gtk_window_activate_defaultMatthias Clasen2019-04-281-26/+5
| | | | | This api has been replaced by an action that can be activated with gtk_widget_activate_action.
* window: Add a default.activate actionMatthias Clasen2019-04-281-0/+27
| | | | | | | Activating this action will replace other activate_default apis. It is more flexible, since intermediate widgets can intercept the action and do their own handling.
* Rename gtk_window_set_defaultMatthias Clasen2019-04-281-5/+5
| | | | | | Call it gtk_window_set_default_widget, to match the getter, and the property name. Update all callers.