Commit Graph

25 Commits

Author SHA1 Message Date
Carlos Garnacho
3f7eefb922 inspector: Use seat grabs for the "inspect widget" feature
And remove some usages of GdkDeviceManager API.
2015-12-16 19:47:07 +01:00
Timm Bäder
571da2a8b3 Inspector: Protect against childless windows 2015-08-26 12:04:44 +02:00
Matthias Clasen
142efd186d Inspector: Preserve selection when rescanning
We are semiregularly repopulating the object tree. Whenever
we do, we loose the selection, needlessly. Do the extra work
to preserve it.

http://bugzilla.gnome.org/show_bug.cgi?id=753130
2015-08-02 15:20:17 -04:00
Matthias Clasen
5c2759af3c Use standard cursor names
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.

https://bugzilla.gnome.org/show_bug.cgi?id=652085
2015-07-26 01:45:06 -04:00
Carlos Garnacho
70e7b4c848 inspector: Remove flash timeout from widgets being unmapped
Otherwise the timeout can keep running, even if the widget is being
destroyed.
2015-03-16 16:29:37 +01:00
Matthias Clasen
cf4afd0e93 inspector: Don't force-switch to the objects tab
We used to switch to the objects tab when an object is
picked, but now may have two places with picker buttons:
the objects tab and the interactive tab.

So, just don't do that anymore.
2014-12-09 20:57:58 -05:00
Matthias Clasen
44bf61baac inspector: Another indentation fix 2014-12-09 19:23:54 -05:00
Benjamin Otte
4d7369d1a8 inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the
previous hilight was still flashing.
This is inconvenient while arrowing through the object selection
treeview though where you want the currently selected row to hilight
when arrowing quickly.
2014-12-01 15:43:43 +01:00
Matthias Clasen
47191ce173 Make the inspector window translucent instead of lowering
Make the inspector window click-through and see-through
when we can, instead of lowering it. This is useful, since
Wayland has no lowering.
2014-10-29 23:29:20 -04:00
Matthias Clasen
850143b7a0 Inspector: Make picking work without a grab
Turns out Weston takes an X grab while delivering button events.
Thus, trying to take a grab in response to a button press is
futile.
2014-10-28 07:05:45 -04:00
Matthias Clasen
c16fa45bfe inspector: Use a separate display connection
This helps isolate the inspector from some of the changes that
it can trigger. To specify a different display, set
GTK_INSPECTOR_DISPLAY to the name of the display to use for
the inspector window. If no display is specified, GTK+ will
use a separate connection to the default display.
2014-10-24 15:57:33 -04:00
Matthias Clasen
a8dc098699 inspector: More refactoring
Rename widget tree to object tree. It contains plenty of
non-widgets nowadays, after all.
2014-10-11 00:59:36 -04:00
Matthias Clasen
6128082f20 inspector: Save some more space
Instead of nesting two notebooks, use a stack switcher in
the headerbar for the outer notebook. This saves valuable
vertical space.
2014-10-11 00:59:36 -04:00
Matthias Clasen
fee46bda00 inspector: Fix a thinko
We still need to possibly scan the toplevel after selecting
a widget, since we don't monitor the list of toplevels, so
the window may not be in our tree yet. This was broken in
commit e7bd73f2b0.
2014-10-03 22:12:54 -04:00
Matthias Clasen
e7bd73f2b0 inspector: Simplify populating the tree
No need to loop toplevels in two places.
2014-09-26 09:50:33 -04:00
Matthias Clasen
c88c16d1f4 inspector: Fix various compiler warnings
Mostly missing declarations and missing statics.
2014-09-05 20:52:03 -04:00
Matthias Clasen
0c417dfc30 inspector: Prevent looping when picking widgets
What was happening that the button press event that we use
to select a widget caused another clicked signal emission of
the inspect button, starting another pick action.
2014-09-01 11:39:08 -04:00
Matthias Clasen
f8986d9aa7 inspector: Clean up includes
Don't include gtk.h, instead include individual headers.
And include config.h and gi18n-lib.h everywhere.
2014-07-11 23:14:04 -04:00
Matthias Clasen
b0390a3349 GtkInspector: Add a function to select the widget under the pointer 2014-07-06 22:37:57 -04:00
Matthias Clasen
2e5cda99f8 inspector: Allow Escape to cancel picking 2014-06-13 06:10:23 -04:00
Matthias Clasen
3266b4dd9b inspector: Make picking more robust
Apparently ClutterOffscreen returns NULL as a window.
While that is not cool, we shouldn't crash.
2014-06-06 13:35:40 -04:00
Matthias Clasen
23aeb955ce inspector: Lower the inspector window when picking
This avoids the problem  of the inspector window covering the
widget you want to pick.
2014-06-04 20:29:10 -04:00
Matthias Clasen
205e8f7e58 inspector: Show the widget tree when picking
Makes more sense that way.
2014-06-04 20:12:42 -04:00
Matthias Clasen
538b987bc5 inspector: Add a way to highlight widgets
In contrast to the flashing, where we blink the widget a
few times, this is explicitly turned on and off.

It will be used for indicating widgets that are part of
a size group, in the next commit.
2014-05-20 21:43:00 -04:00
Matthias Clasen
59c9d24bbf inspector: stop being a module
Moving the inspector into libgtk lets use reuse internals without
having to add public API for everything or inventing awkward private
call conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=730095
2014-05-14 21:23:44 -04:00