summaryrefslogtreecommitdiff
path: root/gtk/gtkwindow.c
Commit message (Collapse)AuthorAgeFilesLines
* Hide popovers and toplevels by defaultTimm Bäder2017-01-201-0/+3
|
* Remove gtk_container_snapshot_childTimm Bäder2017-01-071-3/+3
| | | | Replace it with the already existing gtk_widget_snapshot_child.
* Add gtk_widget_set_focus_childTimm Bäder2017-01-071-1/+1
| | | | | With a very useful implementation, but at least now we don't get runtime warnings.
* API: gdk: Add gdk_rgba_is_clear() and gdk_rgba_is_opaque()Benjamin Otte2016-12-201-3/+1
| | | | | | | I want to use these inside GSK, and I'm not a fan of putting GdkRGBA APIs into it or duplicating it into GTK. So public API it is.
* Use Unicode in translatable stringsPiotr Drąg2016-12-191-3/+3
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772371
* gtk: Remove unneeded gtk_snapshot_push()/pop() callsBenjamin Otte2016-12-091-7/+0
|
* gsk: Add gsk_renderer_new_for_window()Benjamin Otte2016-11-301-10/+8
| | | | | | | | | | | | and remove gsk_renderer_get_for_display(). This new function returns a realized renderer. Because of that, GSK can catch failures to realize, destroy the renderer and try another one. Or in short: I can finally use GTK on Weston with the nvidia binary drivers again. Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* gsk: Change gsk_renderer_realize()Benjamin Otte2016-11-301-4/+2
| | | | | | | Instead of having a gsk_renderer_set_window() call, pass the window to realize(). This way, the realization can fail with the wrong window. Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* Drop the GDK_PRIVATE_CALL mechanismMatthias Clasen2016-11-231-3/+3
| | | | | We don't need to do this extra complication anymore, since we're now living inside a single shared library.
* window: unrealize renderer before destroying GDK windowBenjamin Otte2016-11-231-3/+7
| | | | | | | | We need to unrealize the children manually for that to happen, but so it goes. The order is necessary because we want the renderer to still be alive while children are unrealizing.
* Make unknown window types fatalMatthias Clasen2016-11-191-1/+1
| | | | | This helps gcc to see that there's no point in warning about gdk_window being used uninitialized.
* window: Unrealize renderer lastBenjamin Otte2016-11-151-3/+3
| | | | | | We want to unrealize the renderer only after all widgets have been unrealized. Otherwise, the widgets cannot release rendering resources like textures.
* snapshot: Add gtk_snapshot_render_background()Benjamin Otte2016-11-151-41/+33
| | | | | | | and gtk_snapshot_render_frame() to be direct replacements for the old gtk_render_*() functions. Use them to replace Cairo usage completely in gtk_window_snapshot().
* snapshot: Completely reengineer APIBenjamin Otte2016-11-151-21/+13
| | | | | | | | | We now try to emulate cairo_t: We keep a stack of nodes via push/pop and a transform matrix. So whenever a new node is added to the snapshot, we transform it by the current transform matrix and append it to the current node.
* window: Implement snapshot()Benjamin Otte2016-11-151-10/+20
|
* window: Properly propagate for_size=-1Timm Bäder2016-11-121-6/+6
|
* window: Use gtk_widget_measureTimm Bäder2016-11-121-6/+20
|
* API: gdk: Add gdk_window_new_popup()Benjamin Otte2016-11-061-22/+18
| | | | ... and use it.
* API: wayland: Add gdk_wayland_window_new_subsurface()Benjamin Otte2016-11-061-19/+14
| | | | ... and use it instead of gdk_window_new().
* API: gdk: Add gdk_window_new_toplevel()Benjamin Otte2016-11-061-26/+23
| | | | ... and use it in GTK.
* gdkwindow: Remove GdkWindowAttr.type_hintBenjamin Otte2016-11-061-4/+2
| | | | | Instead, let the callers call gdk_window_set_type_hint(). Which is surprsingly what every backend did.
* Remove gtk_widget_set_mappedTimm Bäder2016-11-051-2/+2
| | | | Let all the remaining callers chain up.
* API: gdk: Remove title from gdk_window_new()Benjamin Otte2016-11-051-2/+3
| | | | Use gdk_window_set_title() afterwards instead.
* rendernode: Require passing a renderer to get_draw_context()Benjamin Otte2016-11-011-1/+1
| | | | | | This is in preparation of making render nodes independent of the renderer, so that they can be rendered multiple times with different renderers.
* widget: Remove app-paintableTimm Bäder2016-10-311-30/+24
|
* API: screen: Remove gdk_screen_is_composited()Benjamin Otte2016-10-291-22/+6
| | | | | | | | Switch code to use gdk_display_is_composited() instead. The new code also doesn't use a vfunc to query the property but rather requires the backend to call set_composited()/set_rgba() to change the value.
* API: widget: Remove GtkWidget::composited-changed signalBenjamin Otte2016-10-291-28/+3
| | | | | | | Nobody uses it. If you need the functionality, listen to display changes on your widget and then connect to the display's notify::composited.
* gtk: Add back infrastructure for GTK_DEBUG=updatesBenjamin Otte2016-10-271-1/+11
| | | | | | | | | Includes the ability to turn on updates in the inspector. Animations are now run via a tick function which allows us to neatly overlay a semi-transparent red rectangle and fade it out over time. It also probably enables way more, but somebody with more UI neatness than me needs to figure out what it eanbles first...
* widget: Redo how gtk_widget_queue_draw() worksBenjamin Otte2016-10-271-0/+16
| | | | | | | | | | | | Before, we would immediately invalidate the GdkWindow of the widget, now we call the parent's GtkWidgetClass.queue_draw_child() function. This allows the parent to track redraw queueing of children. By default GtkWidgetClass.queue_draw_child() will again chain up to its parent while respecting the GdkWindow hierarchy for clipping. GtkWindow is then the only widget actually invalidating the GdkWindow. This essentially moves redraw queueing from GDK to GTK.
* Drop support for offscreen GdkWindowswip/alexl/no-offscreenAlexander Larsson2016-10-251-1/+0
| | | | | | These complicate a lot of GdkWindow internals to implement features that not a lot of apps use, and will be better achieved using gsk. So, we just drop it all.
* widget: Use ::measure vfunc to measure sizeTimm Bäder2016-10-221-253/+84
| | | | | | | | Add a new ::measure vfunc similar to GtkCssGadget's that widget implementations have to override instead of the old get_preferred_width, get_preferred_height, get_preferred_width_for_height, get_preferred_height_for_width and get_preferred_height_and_baseline_for_width.
* window: Don't leak the GskRendererTimm Bäder2016-10-211-0/+2
|
* gsk: Remove :use-alpha from GskRendererEmmanuele Bassi2016-10-181-1/+0
| | | | | It's unused, and we always assume we render with an alpha channel enabled because it's 2016.
* gsk: Drop modelview/projection from GskRenderer APIEmmanuele Bassi2016-10-181-17/+0
| | | | | | | The details of the modelview and projection matrices are only useful for the GL renderer; there's really no point in having those details available in the generic API — especially as the Cairo fallback renderer cannot really set up a complex modelview or a projection matrix.
* Use the projection to flip around the contentEmmanuele Bassi2016-10-181-4/+6
| | | | | | | | Since we use an FBO to render the contents of the render node tree, the coordinate space is going to be flipped in GL. We can undo the flip by using an appropriate projection matrix, instead of changing the sampling coordinates in the shaders and updating all our coordinates at render time.
* gsk: Tie render nodes to renderersEmmanuele Bassi2016-10-181-1/+1
| | | | | | | | | | | | | | | | | Render nodes need access to rendering information like scaling factors. If we keep render nodes separate from renderers until we submit a nodes tree for rendering we're going to have to duplicate all that information in a way that makes the API more complicated and fuzzier on its semantics. By having GskRenderer create GskRenderNode instances we can tie nodes and renderers together; since higher layers will also have access to the renderer instance, this does not add any burden to callers. Additionally, if memory measurements indicate that we are spending too much time in the allocation of new render nodes, we can now easily implement a free-list or a renderer-specific allocator without breaking the API.
* gtk: Port GtkWindow to render nodesEmmanuele Bassi2016-10-181-76/+88
| | | | WARNING: BROKEN COMMIT
* gtk: Use GskRenderNode to render widgetsEmmanuele Bassi2016-10-181-0/+6
| | | | | | | | We need a virtual function to retrieve the GskRenderNode for each widget, which is supposed to attach its own children's GskRenderNodes. Additionally, we want to maintain the existing GtkWidget::draw mechanism for widgets that do not implement get_render_node() — as well as widgets that have handlers connected to the ::draw signal.
* gtk: Add a GskRenderer to GtkWindowEmmanuele Bassi2016-10-181-0/+47
| | | | | Each top-level should have its own GskRenderer, to be used when drawing the render node tree.
* window: Remove decoration-button-layout style propertyTimm Bäder2016-10-181-9/+0
| | | | GtkSettings has a gtk-decoration-layout property for this.
* window: Remove decoration-resize-handle style propertyTimm Bäder2016-10-181-13/+4
|
* gtkwindow: Stop checking gtk-menu-bar-accelTimm Bäder2016-10-181-13/+3
|
* Stop checking GtkSettings:gtk-enable-mnemonicsTimm Bäder2016-10-181-9/+3
|
* window: Remove reshow_with_initial_sizeTimm Bäder2016-10-181-26/+0
|
* window: Use gdk_window_new_child() and gdk_window_new_input()Benjamin Otte2016-10-181-56/+25
|
* gtk: Use appropriate constness for variablesEmmanuele Bassi2016-10-171-5/+2
|
* gtk: Cast static strings assigned to non-const variablesEmmanuele Bassi2016-10-171-1/+1
| | | | | GtkTargetEntry.target is particularly egregious, and it should really be constified.
* container: Remove gtk_container_set_resize_mode()Benjamin Otte2016-10-161-13/+0
|
* API: container: Remove gtk_container_set_border_width()Benjamin Otte2016-10-161-35/+8
|
* API: stylecontext: Remove state argument from gettersBenjamin Otte2016-10-161-10/+8
| | | | The argument must always be the current state.