summaryrefslogtreecommitdiff
path: root/gtk/gtkwindowprivate.h
Commit message (Collapse)AuthorAgeFilesLines
* widget: Don't pass a position to ->size_allocateTimm Bäder2018-11-131-3/+4
| | | | | The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
* Drop gtk_window_set_use_subsurfaceMatthias Clasen2018-08-181-2/+0
| | | | This is no longer used.
* gtkwindow: Move map/delete/configure event management to gtkmainCarlos Garnacho2018-06-211-0/+5
| | | | | | Toplevels are about the only widgets interested in these events, just handle those without going through the capture/bubble handling code.
* gtkwindow: Simplify WM drag/resize handlingCarlos Garnacho2018-06-211-2/+0
| | | | | | | We still need a drag gesture both on front (capture) and back (bubble) to handle dragging from both the GtkWindow widget and chrome in the headerbar. But we can do it through 2 drag gestures, instead of special event handling code.
* Continue renaming window to surfaceAlexander Larsson2018-03-211-2/+2
| | | | This renames a lot of arguments, local variables and functions.
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
* window: Make icons GdkTexturesBenjamin Otte2017-11-051-3/+2
| | | | Cairo surfaces are bad, mkay?
* window: Turn gtk_window_set_screen() into gtk_window_set_display()Benjamin Otte2017-10-311-1/+1
| | | | | | | And have a priv->display instead of a priv->screen. Includes turning gtk_menu_set_screen() into gtk_menu_set_display(), because that function just forwards to its window.
* GtkWindow: Use cairo_surface_t for iconsAlexander Larsson2017-10-221-2/+3
|
* gtkwindowprivate: Remove _gtk_window_keys_foreachTimm Bäder2017-08-141-4/+0
| | | | Unused outside of gtkwindow.c
* winodw: Remove _gtk_window_reposition prototypeTimm Bäder2017-08-141-3/+0
| | | | It's never implemented.
* gtk: Check implicit grab status before sending crossing eventsCarlos Garnacho2017-05-251-0/+3
| | | | | | As we now refrain from sending the crossing events if there's an implicit grab, those events must be sent on button release when the implicit grab is broken.
* gtkwindow: Add private API to update pointer cursorsCarlos Garnacho2017-05-251-0/+3
|
* gtkwindow: Revoke implicit grabs when activating an explicit oneCarlos Garnacho2017-05-251-0/+4
| | | | | | Only if they fall outside the grab widget, in that case the widget holding the implicit grab won't be receiving events anymore, so we can just undo it.
* gtk: Implement per-focus implicit grabsCarlos Garnacho2017-05-251-0/+4
| | | | | | Unlike GTK+ grabs which are global to all/one device, the implicit grab is per focus, which means each may have implicit grabs on different or the same widget.
* gtk: Update GtkPointerFocus targets on mapping/sensitivity changesCarlos Garnacho2017-05-251-0/+3
| | | | | Those are situations that must cause foci on these widgets to repick themselves.
* gtkwindow: Add management functions for GtkPointerFocus instancesCarlos Garnacho2017-05-251-0/+15
| | | | | | Each toplevel will keep its own tracking of the current ongoing foci, add the plumbing that will allow to create/update/remove those as they come and go.
* window: Remove _gtk_window_set_is_toplevelTimm Bäder2017-03-311-3/+0
| | | | All GtkWindow instances are toplevels.
* window: Remove has-toplevel-focus propertyTimm Bäder2017-03-311-2/+0
| | | | | Since embedded toplevels don't exist anymore, :has-toplevel-focus is equivalent to :active.
* gtk: Add a GskRenderer to GtkWindowEmmanuele Bassi2016-10-181-0/+2
| | | | | Each top-level should have its own GskRenderer, to be used when drawing the render node tree.
* API: window: Remove suppport for changing wmclass_name/groupBenjamin Otte2016-10-161-4/+0
| | | | | | | | | X11 was the only backend to support it and people can just override it using XSetClassHint() directly. The docs already advertised the function as "Do not use". Keep the existing call to XSetClassHint() in place, so that we keep setting the same values as in GTK3.
* Put window exporting behind a display protocol agnostic APIMatthias Clasen2016-07-281-0/+11
| | | | | | | | | Introduce a private API meant for abstracting how to get a handle of a window that can be shared with other processes. The API is async, since some implementations will require that. Currently, only X11 is supported, which doesn't. Based on a patch by Jonas Adahl.
* GtkWindow: make popover stacking explicitCarlos Garnacho2015-11-031-0/+2
| | | | | | | | | | | | The list of popovers will specify the stacking order, a _gtk_window_raise_popover() private call has been added so popover widgets can request being on top. Also, the stacking on popovers is ensured on gtk_window_size_allocate(), after the size/stacking changes on the child widget have finished, this will ensure popovers are kept on top of window contents. https://bugzilla.gnome.org/show_bug.cgi?id=756670
* window: Avoid unnecessary detoursMatthias Clasen2015-09-121-0/+2
| | | | | Don't call gtk_widget_get_screen on a window - it only ends up calling gtk_window_get_screen in the end, anyway.
* gtkwindow: Only allow unrestricted positioning to text handle popoversCarlos Garnacho2015-07-061-1/+2
| | | | | | | | | This behavior has been made optional on add_popover() time, text handles will keep being able to overflow the window, in order to allow text selection on views too close to the window edge. Regular GtkPopovers are reinstaurated to the previous size positioning logic though, that is, limited by the visible area of the window.
* window: Add concept of popover "parent"Carlos Garnacho2015-06-171-1/+7
| | | | | | | | | | | This will be the widget that the popover relates to (::pointing-to in GtkPopover, ::parent in GtkTextHandle). Additional API to check the popover/parent relationship between widgets has been added, which will be useful wherever this is necessary in a generic manner. https://bugzilla.gnome.org/show_bug.cgi?id=750993
* window: Add private API to hardcode the main GdkWindow for a GtkWindowCarlos Garnacho2014-09-011-0/+2
| | | | | | | | | This must be called while the window is not realized yet, and sets the GdkWindow that will be used for the next GtkWindow's realize/unrealize cycle. The GtkWindow takes ownership on the GdkWindow, and as such it will be destroyed when the widget is unrealized. https://bugzilla.gnome.org/show_bug.cgi?id=697855
* gtkwindow: Add private API to mark as subsurfaceCarlos Garnacho2014-08-261-0/+3
| | | | | | | | This is a rather hackish way to let GTK+ widgets declare popup windows as subsurfaces, so they may work on wayland without the need of xdg_popup, and without many changes yet on the GTK+ side. https://bugzilla.gnome.org/show_bug.cgi?id=695504
* Allow csd for override-redirect windowsMatthias Clasen2014-06-091-0/+2
| | | | | | | | | | | | | | | This commit makes it possible to use client-side decorations for override-redirect windows by calling _gtk_window_request_csd() before realizing the window. Since the wm won't do interactive resizing for us in this case anyway, don't bother creating the border windows we use for this purpose on regular toplevels. To make this accessible to themes, we set a "csd" style class on client-side decorated windows. With this, .window-frame.csd.menu can be used to define the shadow for csd menus, and .menu can be used to define a border for menus under non-composited wms. https://bugzilla.gnome.org/show_bug.cgi?id=731187
* Split GtkWindowGroup into its own fileMatthias Clasen2014-06-041-0/+7
| | | | | gtkwindow.c is too big and too messy. This is a small step towards making it better.
* inspector: All to turn it on programmaticallyMatthias Clasen2014-05-131-2/+0
| | | | | Export gtk_window_set_interactive_debugging. https://bugzilla.gnome.org/show_bug.cgi?id=730008
* Make the inspector available via GTK_DEBUGMatthias Clasen2014-05-101-0/+2
| | | | | Change things around so GTK_DEBUG=interactive also brings up the inspector window.
* GtkHeaderBar: try harder to find the best window iconMatthias Clasen2014-01-241-0/+3
| | | | | | | | | | GtkWindow has 4 (!) APIs for setting window icons, and we have to try them all in the right order to find the right icon. This commit makes it so, and keeps the icon list manipulation inside gtkwindow.c by adding a private API for getting a single icon at the right size. https://bugzilla.gnome.org/show_bug.cgi?id=722515
* window: Make popover window privateCarlos Garnacho2014-01-221-0/+14
|
* gtkmain: Let windows handle WM-related events before delivering to the ↵Carlos Garnacho2014-01-221-0/+2
| | | | | | | | grab_widget This makes it possible to move/resize client-side decorated windows that are otherwise obscured by a GTK+ grab somewhere else, either a popover within the window itself or a modal dialog above the window.
* window: add an is-maximized property to GtkWindowCosimo Cecchi2014-01-131-1/+0
| | | | | | | | With proper notifications, plus an accessor method for that state. This allows client to just listen to notify::is-maximized instead of tracking window-state-event. https://bugzilla.gnome.org/show_bug.cgi?id=698786
* Redo csd window-draggingMatthias Clasen2014-01-121-3/+0
| | | | | | | | | | | | | | | | | | The window-dragging code had a number of issues: The code was starting a drag on every button press, never bothering to cancel them. This leads to the odd hand cursor occurring between the two clicks to maximize. We relied on GDK's multi-click detection, which gives us triple-clicks when we really want sequences of double-clicks. Lastly, we didn't propery restrict double-click handling to the primary button, so e.g. if you had a window on an empty workspace, double-right click on the titlebar would maximize it, which is not intended. This commit solves all three problem by a doing our own double-click detection, and only starting a drag when the pointer goes out of 'double-click range'. We change the way dragging is implemented for menubars and toolbars to just letting events bubble up, so they get the same behaviour as the titlebar. To make this work, we have to select for pointer motion events in a few more places.
* gtkwindow: Rename get_decoration_size => get_shadow_widthJasper St. Pierre2014-01-101-2/+2
|
* headerbar: Support all kinds of CSD decorationsJasper St. Pierre2013-12-121-0/+3
| | | | | | | Move the gtkwindow.c CSD code into GtkHeaderBar, and make it triggerable by the show-close-button property, and remove shows-fallback-app-menu. https://bugzilla.gnome.org/show_bug.cgi?id=720233
* GtkWindow: better app menu fallback for CSDMatthias Clasen2013-11-161-1/+4
| | | | | | | | Do the menubutton for app menu fallback ourselves in GtkWindow for the csd, non-custom titlebar case. This fits better with the way we handle other title buttons. Themes have control over the placement of this button by placing menu in the decoration-button-layout style property.
* GtkWindow: Make titlebar widget available privatelyMatthias Clasen2013-11-161-0/+2
| | | | | This will be used in GtkApplicationWindow in the following commits.
* menushell/toolbar/window: implement toggle maximize on double clickLionel Landwerlin2013-11-091-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=700419
* GtkApplication: a new approach to accelsRyan Lortie2013-10-151-0/+2
| | | | | | | | | | | | | | | | | | | Rework how accels are handled on GtkApplicationWindow. Instead of having GtkApplication fill the GtkAccelMap which is then used by GtkApplicationWindow to create a GtkAccelGroup filled with closures that is then associated with the window, do it directly. GtkApplication now keeps a list of accels and their actions. Accelerators on a GtkApplicationWindow ask GtkApplication to execute the appropriate action. This saves a fair bit of complexity and memory use (due to not having to create all those closures and accelmap entries). The new approach also supports multiple accels per action (although there is not yet a public API for it). This patch (and the ones before) Reviewed and ACK'd by Matthias Clasen.
* csd: Drop content_windowMatthias Clasen2013-04-201-1/+0
| | | | | | | Instead of reparenting the content, use input-only windows to set cursors and capture clicks on the window frame. This avoids some of the problems that were introduced by content_window, such as black flashes and non-working opacity.
* window: Remove an unused function.Benjamin Otte2013-04-091-5/+0
| | | | | Luckily, we don't need to support an implementation of a minimal WM for linux-fb anymore (which is what this function was added for).
* window: rename functions dealing with mnemonic delayed displayCosimo Cecchi2013-04-021-1/+1
| | | | | | | | Don't mention "auto mnemonics", since those methods are purely about scheduling a delayed display, and that makes understanding the code a bit harder. https://bugzilla.gnome.org/show_bug.cgi?id=697144
* Fix GtkApplicationWindow menubar placementMatthias Clasen2013-03-271-0/+1
| | | | | | | Since the menubar is part of the content, we need to give it the content_window as parent window, to make things work again. https://bugzilla.gnome.org/show_bug.cgi?id=696561
* window: Allow _gtk_window_set_allocation to return a modified allocationRob Bradford2013-03-171-2/+3
| | | | | | | | | | | Update the documentation and users of this function to handle the future case that that we have some internal decorations to the window and useable allocation is thus smaller. By having a separate out parameter there is no need to have an in/out function and allows for greater robustness. The current implementation simply returns the allocation provided.
* window: Add a delay before automatically showing mnemonicsRui Matos2012-08-311-0/+2
| | | | | | | | | Showing mnemonics immediately on modifier press can be annoying and distracting when the user is just trying to Alt+Tab into another application/window since the mnemonic will show up and quickly vanish again when we receive the focus out event. https://bugzilla.gnome.org/show_bug.cgi?id=672431
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|