]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktooltip.c
Change FSF Address
[~andy/gtk] / gtk / gtktooltip.c
index 2ca77489c018a07f0f07c305a72638a402f63a90..19fb0c51710cc5070b97702e0370ac0c640d6688 100644 (file)
@@ -14,9 +14,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -116,7 +114,6 @@ struct _GtkTooltip
   GObject parent_instance;
 
   GtkWidget *window;
-  GtkWidget *alignment;
   GtkWidget *box;
   GtkWidget *image;
   GtkWidget *label;
@@ -608,7 +605,6 @@ maybe_update_shape (GtkTooltip *tooltip)
   cairo_t *cr;
   cairo_surface_t *surface;
   cairo_region_t *region;
-  gint width, height;
 
   /* fallback to XShape only for non-composited clients */
   if (gtk_widget_is_composited (tooltip->window))
@@ -1079,7 +1075,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
   monitor_num = gdk_screen_get_monitor_at_point (screen,
                                                  tooltip->last_x,
                                                  tooltip->last_y);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   get_bounding_box (new_tooltip_widget, &bounds);
 
@@ -1229,6 +1225,7 @@ gtk_tooltip_show_tooltip (GdkDisplay *display)
     }
   else
     {
+      GdkDevice *device;
       gint tx, ty;
 
       window = tooltip->last_window;
@@ -1236,7 +1233,9 @@ gtk_tooltip_show_tooltip (GdkDisplay *display)
       if (!GDK_IS_WINDOW (window))
         return;
 
-      gdk_window_get_pointer (window, &x, &y, NULL);
+      device = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (display));
+
+      gdk_window_get_device_position (window, device, &x, &y, NULL);
 
       gdk_window_get_root_coords (window, x, y, &tx, &ty);
       tooltip->last_x = tx;