Matthias Clasen
5a93449b89
window: Make fallback menu a popover
...
We want to phase out menus.
2019-09-16 07:23:17 -04:00
Alexander Larsson
96b37f4eb8
Use the new GtkBuildableParser type in GtkBuildable interfaces
2019-09-10 12:08:20 -04:00
Timm Bäder
71339225eb
icontheme: Remove gtk_icon_info_load_texture
...
It's the same as load_icon now.
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Timm Bäder
18714e25a8
window: Remove useless deprecation guards
...
gtk_window_present() is not deprecated.
2019-09-09 17:36:24 +02:00
Timm Bäder
b2e94f81cf
window: Remove some leftover event code
2019-08-03 14:44:25 +02:00
Ray Strode
1612e38cda
window: sort icons before adding to _NET_WM_ICON
...
When processing the list of icons for a window to add them to
_NET_WM_ICON gdk_x11_surface_set_icon_list only adds as many
icon sizes as will fit within X protocol limits.
It achieves this by keeping a running total of the number of
bytes taken up by icons already processed and bails as soon
as it goes over the limit.
The problem is, one 512x512 icon is already over the limit,
and so no icons will get added at all if the first icon in
list is 512x512.
Indeed, the code seems to assume the list is sorted from smallest
icon to biggest icon.
This commit changes the caller to sort the list.
2019-08-01 16:48:58 -04:00
Timm Bäder
b2d639b6d9
window: Unroot with old display
...
Things might rely on the old display being set while unrooting.
Fixes #2052
2019-07-27 07:57:06 +02:00
Timm Bäder
8f734b01b2
window: Plug a GList leak
...
We need to free the GList manually when using g_list_remove_link().
2019-07-21 12:45:10 +02:00
Timm Bäder
8beea4d958
window: Merge some functions into their only callers
...
So it's clear we only add or remove the pointerfocus-es in
_update_pointer_focus.
2019-07-21 11:06:24 +02:00
Timm Bäder
264d4bada6
widget: Remove queue_resize_no_redraw
...
We always invalidate the widget in size_allocate() anyway.
2019-07-07 07:43:08 +02:00
Emmanuele Bassi
e07098da03
window: Create a GtkConstraintSolver
...
Implement the GtkRoot getter for GtkConstraintSolver.
2019-06-30 23:42:44 +01:00
Matthias Clasen
996f011ed8
window: Fix the default value of mnemonics-visible
...
They aren't visible, so why should the property
be TRUE?
2019-06-23 10:59:17 -04:00
Matthias Clasen
7e73da5f73
widget: Add parameter type back to install_action
...
Adapt all callers.
2019-06-22 16:48:16 -04:00
Matthias Clasen
9b0d87c5a7
window: Cosmetics
2019-06-21 02:55:27 +00:00
Matthias Clasen
dee9e40ad3
Build fix
2019-06-20 22:47:35 -04:00
Matthias Clasen
a933a9bc79
Fix initial mnemonic visibility
...
We were showing mnemonics initially, which is not desired.
2019-06-21 02:38:05 +00:00
Matthias Clasen
6a4a082660
main: Move visible mnemonics handling
...
No need to special-case this anymore; we can use
a regular event controller in GtkWindow for this.
2019-06-21 02:37:51 +00:00
Matthias Clasen
a7cdcdf92c
main: Move visible focus handling
...
No need to special-case this anymore; we can use
a regular event controller in GtkWindow for this.
2019-06-21 02:37:12 +00:00
Daniel Boles
ab7b9d882e
Window: Hyperlink to GtkBuildable from its section
2019-06-18 21:45:08 +01:00
Matthias Clasen
dafb7054a1
window: Use the new action machinery
...
Change the default.activate action to use the
new action machinery.
2019-06-18 14:47:33 -04:00
Matthias Clasen
31066a697b
window: Fix focus wraparound
...
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
2019-06-11 10:14:14 -04:00
Matthias Clasen
aa267c1c84
Add gtkmenubarprivate.h
...
Move private api into a private header.
2019-06-01 21:56:49 +00:00
Matthias Clasen
90f330e27a
Merge branch 'gesture-click' into 'master'
...
Rename GtkGestureMultiPress to GtkGestureClick
See merge request GNOME/gtk!878
2019-05-29 18:39:09 +00:00
Matthias Clasen
b867cbe0d8
Cosmetics
...
Remove an unused variable.
2019-05-29 18:04:08 +00:00
Matthias Clasen
2081bf346e
window: Remove move unused fields
...
position_constraints_changed is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
74db7cbe00
window: Never call gdk_surface_move
...
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.
2019-05-29 18:04:08 +00:00
Matthias Clasen
d6d5d60703
Drop an empty function
...
gtk_window_constrain_position is not doing anything
anymore, so no need to call it.
2019-05-29 18:04:08 +00:00
Matthias Clasen
ece7fff339
window: Drop more unused fields
...
need_default_position is never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
147adc0bc5
window: Drop some unused fields
...
initial_x/y and initial_pos_set are never used.
2019-05-29 18:04:08 +00:00
Matthias Clasen
a8899cc6a3
window: Drop gtk_window_set_position
...
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
2019-05-29 18:04:08 +00:00
Matthias Clasen
7f65e5f96b
Rename GtkGestureMultiPress to GtkGestureClick
...
The name just made it hard for people to find the
right gesture to use.
2019-05-29 17:10:46 +00:00
Benjamin Otte
56db17e5e8
Revert "window: Chain up in show/hide"
...
This reverts commit 863f4d13ff
.
2019-05-29 16:52:13 +02:00
Benjamin Otte
863f4d13ff
window: Chain up in show/hide
2019-05-29 16:34:56 +02:00
Руслан Ижбулатов
90058ed951
Don't assume that gdk_surface[_move]_resize() is asynchronous
...
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.
2019-05-28 20:25:17 +00:00
Matthias Clasen
5ccb081fdb
Avoid compiler warnings
...
Avoid priv being flagged as unused on win32.
2019-05-28 20:25:17 +00:00
Matthias Clasen
948347afa9
Stop using gtk_widget_is_toplevel
2019-05-28 20:25:16 +00:00
Matthias Clasen
302d2a04ae
Stop using gtk_widget_get_surface
...
Replace all uses of gtk_widget_get_surface by
gtk_native_get_surface.
2019-05-28 20:25:16 +00:00
Matthias Clasen
0b3a971056
window: Make unrealize work again
...
GtkWidgets unrealize accesses the frame clock
of the surface, so we need to keep the surface
in place until after we've chained up.
2019-05-28 20:25:15 +00:00
Matthias Clasen
b99962e7a2
Drop gtk_widget_set_surface
...
Not used anymore. Only GtkNative's have surfaces.
2019-05-28 20:25:15 +00:00
Matthias Clasen
0047492bf9
Work toward dropping widget->surface
...
Drop special-casing of GtkNative in
most widget vfuncs. GtkNative implementations
need to override these anyway.
2019-05-28 20:25:15 +00:00
Matthias Clasen
18788c2a86
Remove gtk_widget_get/set_has_surface
...
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
1f2d3c0900
window: Don't inherit cursors across surfaces
...
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.
2019-05-28 20:25:15 +00:00
Matthias Clasen
d2951d3aac
Rename surface constructors
...
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.
2019-05-28 20:25:14 +00:00
Matthias Clasen
81a673c908
window: Stop using gtk_widget_register_surface
...
The GtkRoot implementations are expected to handle
the necessary surface setup themselves, going forward.
2019-05-28 20:25:14 +00:00
Matthias Clasen
6ab8ab87c8
Reimplement GtkPopover
2019-05-28 20:25:13 +00:00
Matthias Clasen
9059eee2f0
Review and replace uses of get_toplevel
...
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.
2019-05-28 20:24:39 +00:00
Matthias Clasen
c1d5e82d95
Use GtkNative APIs instead of GtkRoot
2019-05-28 20:24:39 +00:00
Matthias Clasen
5bf2b633bb
window: Implement GtkNative
...
Adapt GtkWindow to implement both GtkRoot and GtkNative.
2019-05-28 20:24:39 +00:00
Benjamin Otte
9521af0f6a
window: Remove unneeded variable
...
The variable would show up as a gcc warning in builds without X11
support.
2019-05-21 07:23:30 +02:00