mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display(). (#85671) * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c: Adapt to above change.
This commit is contained in:
parent
1371ded54c
commit
621fb7466a
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -1,3 +1,16 @@
|
||||
Tue Jun 18 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
|
||||
gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
|
||||
gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
|
||||
(#85671)
|
||||
|
||||
* gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
|
||||
gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
|
||||
gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
|
||||
gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
|
||||
Adapt to above change.
|
||||
|
||||
Tue Jun 18 12:04:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdk.c (gdk_init_check): Change handling
|
||||
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "gdkcursor.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkdisplay.h"
|
||||
#include "gdkinternals.h"
|
||||
|
||||
GType
|
||||
@ -83,8 +83,8 @@ gdk_cursor_unref (GdkCursor *cursor)
|
||||
* gdk_cursor_new:
|
||||
* @cursor_type: cursor to create
|
||||
*
|
||||
* Creates a new cursor from the set of builtin cursors for the default screen.
|
||||
* See gdk_cursor_new_for_screen().
|
||||
* Creates a new cursor from the set of builtin cursors for the default display.
|
||||
* See gdk_cursor_new_for_display().
|
||||
*
|
||||
* To make the cursor invisible, use gdk_cursor_new_from_pixmap() to create
|
||||
* a cursor with no pixels in it.
|
||||
@ -94,5 +94,5 @@ gdk_cursor_unref (GdkCursor *cursor)
|
||||
GdkCursor*
|
||||
gdk_cursor_new (GdkCursorType cursor_type)
|
||||
{
|
||||
return gdk_cursor_new_for_screen (gdk_get_default_screen(), cursor_type);
|
||||
return gdk_cursor_new_for_display (gdk_get_default_display(), cursor_type);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ struct _GdkCursor
|
||||
|
||||
GType gdk_cursor_get_type (void);
|
||||
|
||||
GdkCursor* gdk_cursor_new_for_screen (GdkScreen *screen,
|
||||
GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
GdkCursorType cursor_type);
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
|
||||
@ -116,9 +116,9 @@ GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
GdkColor *bg,
|
||||
gint x,
|
||||
gint y);
|
||||
GdkScreen* gdk_cursor_get_screen (GdkCursor *cursor);
|
||||
GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
|
||||
void gdk_cursor_unref (GdkCursor *cursor);
|
||||
GdkDisplay* gdk_cursor_get_display (GdkCursor *cursor);
|
||||
GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
|
||||
void gdk_cursor_unref (GdkCursor *cursor);
|
||||
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
#define gdk_cursor_destroy gdk_cursor_unref
|
||||
|
@ -18,7 +18,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkdisplay.h"
|
||||
#include "gdkcursor.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
|
||||
@ -84,14 +84,14 @@ _gdk_win32_data_to_wcursor (GdkCursorType cursor_type)
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
gdk_cursor_new_for_screen (GdkScreen *screen,
|
||||
GdkCursorType cursor_type)
|
||||
gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
GdkCursorType cursor_type)
|
||||
{
|
||||
GdkCursorPrivate *private;
|
||||
GdkCursor *cursor;
|
||||
HCURSOR hcursor;
|
||||
|
||||
g_return_val_if_fail (screen == gdk_get_default_screen (), NULL);
|
||||
g_return_val_if_fail (display == gdk_get_default_display (), NULL);
|
||||
|
||||
hcursor = _gdk_win32_data_to_wcursor (cursor_type);
|
||||
|
||||
@ -307,8 +307,8 @@ _gdk_cursor_destroy (GdkCursor *cursor)
|
||||
g_free (private);
|
||||
}
|
||||
|
||||
GdkScreen *
|
||||
gdk_cursor_get_screen (GdkCursor *cursor)
|
||||
GdkDisplay *
|
||||
gdk_cursor_get_display (GdkCursor *cursor)
|
||||
{
|
||||
return gdk_get_default_screen ();
|
||||
return gdk_get_default_display ();
|
||||
}
|
||||
|
@ -32,11 +32,10 @@
|
||||
#include "gdkpixmap-x11.h"
|
||||
#include "gdkx.h"
|
||||
#include <gdk/gdkpixmap.h>
|
||||
#include "gdkscreen-x11.h"
|
||||
|
||||
/**
|
||||
* gdk_cursor_new_for_screen:
|
||||
* @screen: the #GdkScreen where the cursor will be defined
|
||||
* gdk_cursor_new_for_display:
|
||||
* @display: the #GdkDisplay for which the cursor will be created
|
||||
* @cursor_type: cursor to create
|
||||
*
|
||||
* Creates a new cursor from the set of builtin cursors.
|
||||
@ -101,18 +100,18 @@
|
||||
* Return value: a new #GdkCursor
|
||||
**/
|
||||
GdkCursor*
|
||||
gdk_cursor_new_for_screen (GdkScreen *screen,
|
||||
GdkCursorType cursor_type)
|
||||
gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
GdkCursorType cursor_type)
|
||||
{
|
||||
GdkCursorPrivate *private;
|
||||
GdkCursor *cursor;
|
||||
Cursor xcursor;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
xcursor = XCreateFontCursor (GDK_SCREEN_XDISPLAY (screen), cursor_type);
|
||||
xcursor = XCreateFontCursor (GDK_DISPLAY_XDISPLAY (display), cursor_type);
|
||||
private = g_new (GdkCursorPrivate, 1);
|
||||
private->screen = screen;
|
||||
private->display = display;
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor *) private;
|
||||
cursor->type = cursor_type;
|
||||
@ -134,7 +133,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
Pixmap source_pixmap, mask_pixmap;
|
||||
Cursor xcursor;
|
||||
XColor xfg, xbg;
|
||||
GdkScreen *screen;
|
||||
GdkDisplay *display;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_PIXMAP (source), NULL);
|
||||
g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL);
|
||||
@ -143,7 +142,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
|
||||
source_pixmap = GDK_PIXMAP_XID (source);
|
||||
mask_pixmap = GDK_PIXMAP_XID (mask);
|
||||
screen = GDK_PIXMAP_SCREEN (source);
|
||||
display = GDK_PIXMAP_DISPLAY (source);
|
||||
|
||||
xfg.pixel = fg->pixel;
|
||||
xfg.red = fg->red;
|
||||
@ -154,10 +153,10 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
xbg.blue = bg->blue;
|
||||
xbg.green = bg->green;
|
||||
|
||||
xcursor = XCreatePixmapCursor (GDK_SCREEN_XDISPLAY (screen),
|
||||
xcursor = XCreatePixmapCursor (GDK_DISPLAY_XDISPLAY (display),
|
||||
source_pixmap, mask_pixmap, &xfg, &xbg, x, y);
|
||||
private = g_new (GdkCursorPrivate, 1);
|
||||
private->screen = screen;
|
||||
private->display = display;
|
||||
private->xcursor = xcursor;
|
||||
cursor = (GdkCursor *) private;
|
||||
cursor->type = GDK_CURSOR_IS_PIXMAP;
|
||||
@ -175,7 +174,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
|
||||
g_return_if_fail (cursor->ref_count == 0);
|
||||
|
||||
private = (GdkCursorPrivate *) cursor;
|
||||
XFreeCursor (GDK_SCREEN_XDISPLAY (private->screen), private->xcursor);
|
||||
XFreeCursor (GDK_DISPLAY_XDISPLAY (private->display), private->xcursor);
|
||||
|
||||
g_free (private);
|
||||
}
|
||||
@ -185,7 +184,7 @@ gdk_x11_cursor_get_xdisplay (GdkCursor *cursor)
|
||||
{
|
||||
g_return_val_if_fail (cursor != NULL, NULL);
|
||||
|
||||
return GDK_SCREEN_XDISPLAY(((GdkCursorPrivate *)cursor)->screen);
|
||||
return GDK_DISPLAY_XDISPLAY(((GdkCursorPrivate *)cursor)->display);
|
||||
}
|
||||
|
||||
Cursor
|
||||
@ -197,18 +196,18 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor)
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_cursor_get_screen:
|
||||
* gdk_cursor_get_display:
|
||||
* @cursor : a #GdkCursor.
|
||||
*
|
||||
* Returns the screen on which the GdkCursor is defined
|
||||
* Returns the display on which the GdkCursor is defined
|
||||
*
|
||||
* Returns : the #GdkScreen associated to @cursor
|
||||
* Returns : the #GdkDisplay associated to @cursor
|
||||
*/
|
||||
|
||||
GdkScreen *
|
||||
gdk_cursor_get_screen (GdkCursor *cursor)
|
||||
GdkDisplay *
|
||||
gdk_cursor_get_display (GdkCursor *cursor)
|
||||
{
|
||||
g_return_val_if_fail (cursor != NULL, NULL);
|
||||
|
||||
return ((GdkCursorPrivate *)cursor)->screen;
|
||||
return ((GdkCursorPrivate *)cursor)->display;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include <gdk/x11/gdkwindow-x11.h>
|
||||
#include <gdk/x11/gdkpixmap-x11.h>
|
||||
#include <gdk/x11/gdkdisplay-x11.h>
|
||||
|
||||
#include "gdkinternals.h"
|
||||
|
||||
@ -81,7 +82,7 @@ struct _GdkCursorPrivate
|
||||
{
|
||||
GdkCursor cursor;
|
||||
Cursor xcursor;
|
||||
GdkScreen *screen;
|
||||
GdkDisplay *display;
|
||||
};
|
||||
|
||||
struct _GdkVisualPrivate
|
||||
|
@ -4545,8 +4545,8 @@ gtk_clist_realize (GtkWidget *widget)
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK);
|
||||
attributes_mask = GDK_WA_CURSOR;
|
||||
attributes.cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget),
|
||||
GDK_SB_H_DOUBLE_ARROW);
|
||||
attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_SB_H_DOUBLE_ARROW);
|
||||
clist->cursor_drag = attributes.cursor;
|
||||
|
||||
attributes.x = LIST_WIDTH (clist) + 1;
|
||||
|
@ -757,8 +757,8 @@ gtk_combo_list_key_press (GtkWidget * widget, GdkEventKey * event, GtkCombo * co
|
||||
static void
|
||||
combo_event_box_realize (GtkWidget *widget)
|
||||
{
|
||||
GdkCursor *cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget),
|
||||
GDK_TOP_LEFT_ARROW);
|
||||
GdkCursor *cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_TOP_LEFT_ARROW);
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
gdk_cursor_destroy (cursor);
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ gtk_curve_graph_events (GtkWidget *widget, GdkEvent *event, GtkCurve *c)
|
||||
|
||||
c->cursor_type = new_type;
|
||||
|
||||
cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (w),
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (w),
|
||||
c->cursor_type);
|
||||
gdk_window_set_cursor (w->window, cursor);
|
||||
gdk_cursor_destroy (cursor);
|
||||
|
26
gtk/gtkdnd.c
26
gtk/gtkdnd.c
@ -182,7 +182,7 @@ static void gtk_drag_get_event_actions (GdkEvent *event,
|
||||
GdkDragAction actions,
|
||||
GdkDragAction *suggested_action,
|
||||
GdkDragAction *possible_actions);
|
||||
static GdkCursor * gtk_drag_get_cursor (GdkScreen *screen,
|
||||
static GdkCursor * gtk_drag_get_cursor (GdkDisplay *display,
|
||||
GdkDragAction action);
|
||||
static GtkWidget *gtk_drag_get_ipc_widget (GdkScreen *screen);
|
||||
static void gtk_drag_release_ipc_widget (GtkWidget *widget);
|
||||
@ -552,7 +552,7 @@ gtk_drag_get_event_actions (GdkEvent *event,
|
||||
}
|
||||
|
||||
static GdkCursor *
|
||||
gtk_drag_get_cursor (GdkScreen *screen,
|
||||
gtk_drag_get_cursor (GdkDisplay *display,
|
||||
GdkDragAction action)
|
||||
{
|
||||
gint i;
|
||||
@ -562,7 +562,7 @@ gtk_drag_get_cursor (GdkScreen *screen,
|
||||
break;
|
||||
if (drag_cursors[i].cursor != NULL)
|
||||
{
|
||||
if (screen != gdk_cursor_get_screen (drag_cursors[i].cursor))
|
||||
if (display != gdk_cursor_get_display (drag_cursors[i].cursor))
|
||||
{
|
||||
gdk_cursor_unref (drag_cursors[i].cursor);
|
||||
drag_cursors[i].cursor = NULL;
|
||||
@ -571,20 +571,16 @@ gtk_drag_get_cursor (GdkScreen *screen,
|
||||
|
||||
if (drag_cursors[i].cursor == NULL)
|
||||
{
|
||||
GdkColormap *colormap;
|
||||
GdkColor fg, bg;
|
||||
GdkColor bg = { 0, 0xffff, 0xffff, 0xffff };
|
||||
GdkColor fg = { 0, 0x0000, 0x0000, 0x0000 };
|
||||
GdkScreen *screen = gdk_display_get_default_screen (display);
|
||||
GdkWindow *window = gdk_screen_get_root_window (screen);
|
||||
|
||||
GdkPixmap *pixmap =
|
||||
gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen),
|
||||
drag_cursors[i].bits, CURSOR_WIDTH, CURSOR_HEIGHT);
|
||||
gdk_bitmap_create_from_data (window, drag_cursors[i].bits, CURSOR_WIDTH, CURSOR_HEIGHT);
|
||||
|
||||
GdkPixmap *mask =
|
||||
gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen),
|
||||
drag_cursors[i].mask, CURSOR_WIDTH, CURSOR_HEIGHT);
|
||||
|
||||
colormap = gdk_screen_get_system_colormap (screen);
|
||||
gdk_color_white (colormap, &bg);
|
||||
gdk_color_black (colormap, &fg);
|
||||
gdk_bitmap_create_from_data (window, drag_cursors[i].mask, CURSOR_WIDTH, CURSOR_HEIGHT);
|
||||
|
||||
drag_cursors[i].cursor = gdk_cursor_new_from_pixmap (pixmap, mask, &fg, &bg, 0, 0);
|
||||
|
||||
@ -1843,7 +1839,7 @@ gtk_drag_begin (GtkWidget *widget,
|
||||
gtk_drag_get_event_actions (event, info->button, actions,
|
||||
&suggested_action, &possible_actions);
|
||||
|
||||
info->cursor = gtk_drag_get_cursor (gtk_widget_get_screen (widget), suggested_action);
|
||||
info->cursor = gtk_drag_get_cursor (gtk_widget_get_display (widget), suggested_action);
|
||||
|
||||
/* Set cur_x, cur_y here so if the "drag_begin" signal shows
|
||||
* the drag icon, it will be in the right place
|
||||
@ -2467,7 +2463,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
|
||||
}
|
||||
else if (info->have_grab)
|
||||
{
|
||||
cursor = gtk_drag_get_cursor (gtk_widget_get_screen (widget),
|
||||
cursor = gtk_drag_get_cursor (gtk_widget_get_display (widget),
|
||||
event->dnd.context->action);
|
||||
if (info->cursor != cursor)
|
||||
{
|
||||
|
@ -972,7 +972,7 @@ gtk_entry_realize (GtkWidget *widget)
|
||||
|
||||
get_text_area_size (entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height);
|
||||
|
||||
attributes.cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget), GDK_XTERM);
|
||||
attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_XTERM);
|
||||
attributes_mask |= GDK_WA_CURSOR;
|
||||
|
||||
entry->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
|
||||
@ -1435,7 +1435,7 @@ gtk_entry_motion_notify (GtkWidget *widget,
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget), GDK_XTERM);
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_XTERM);
|
||||
gdk_window_set_cursor (entry->text_area, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
entry->mouse_cursor_obscured = FALSE;
|
||||
|
@ -990,8 +990,8 @@ gtk_handle_box_button_changed (GtkWidget *widget,
|
||||
hb->attach_allocation.height = height;
|
||||
|
||||
hb->in_drag = TRUE;
|
||||
fleur = gdk_cursor_new_for_screen (gdk_drawable_get_screen (widget->window),
|
||||
GDK_FLEUR);
|
||||
fleur = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_FLEUR);
|
||||
if (gdk_pointer_grab (widget->window,
|
||||
FALSE,
|
||||
(GDK_BUTTON1_MOTION_MASK |
|
||||
|
@ -753,8 +753,8 @@ set_cross_grab (GtkHSV *hsv,
|
||||
|
||||
priv = hsv->priv;
|
||||
|
||||
cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (GTK_WIDGET (hsv)),
|
||||
GDK_CROSSHAIR);
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (hsv)),
|
||||
GDK_CROSSHAIR);
|
||||
gdk_pointer_grab (priv->window, FALSE,
|
||||
(GDK_POINTER_MOTION_MASK
|
||||
| GDK_POINTER_MOTION_HINT_MASK
|
||||
|
@ -2292,8 +2292,8 @@ gtk_label_create_window (GtkLabel *label)
|
||||
attributes.window_type = GDK_WINDOW_TEMP;
|
||||
attributes.wclass = GDK_INPUT_ONLY;
|
||||
attributes.override_redirect = TRUE;
|
||||
attributes.cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget),
|
||||
GDK_XTERM);
|
||||
attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_XTERM);
|
||||
attributes.event_mask = gtk_widget_get_events (widget) |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
|
@ -459,8 +459,8 @@ gtk_paned_realize (GtkWidget *widget)
|
||||
attributes.y = paned->handle_pos.y;
|
||||
attributes.width = paned->handle_pos.width;
|
||||
attributes.height = paned->handle_pos.height;
|
||||
attributes.cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget),
|
||||
paned->cursor_type);
|
||||
attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
paned->cursor_type);
|
||||
attributes.event_mask = gtk_widget_get_events (widget);
|
||||
attributes.event_mask |= (GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
|
@ -1344,7 +1344,7 @@ gtk_text_realize (GtkWidget *widget)
|
||||
attributes.width = MAX (1, (gint)widget->allocation.width - (gint)attributes.x * 2);
|
||||
attributes.height = MAX (1, (gint)widget->allocation.height - (gint)attributes.y * 2);
|
||||
|
||||
attributes.cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget), GDK_XTERM);
|
||||
attributes.cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_XTERM);
|
||||
attributes_mask |= GDK_WA_CURSOR;
|
||||
|
||||
text->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
|
||||
|
@ -3987,8 +3987,8 @@ gtk_text_view_motion_event (GtkWidget *widget, GdkEventMotion *event)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget),
|
||||
GDK_XTERM);
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
|
||||
GDK_XTERM);
|
||||
gdk_window_set_cursor (text_view->text_window->bin_window, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
text_view->mouse_cursor_obscured = FALSE;
|
||||
@ -6581,8 +6581,8 @@ text_window_realize (GtkTextWindow *win,
|
||||
if (win->type == GTK_TEXT_WINDOW_TEXT)
|
||||
{
|
||||
/* I-beam cursor */
|
||||
cursor = gdk_cursor_new_for_screen (gdk_drawable_get_screen (parent),
|
||||
GDK_XTERM);
|
||||
cursor = gdk_cursor_new_for_display (gdk_drawable_get_display (parent),
|
||||
GDK_XTERM);
|
||||
gdk_window_set_cursor (win->bin_window, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
|
||||
|
@ -342,8 +342,8 @@ gtk_tips_query_real_start_query (GtkTipsQuery *tips_query)
|
||||
|
||||
g_return_if_fail (GTK_IS_TIPS_QUERY (tips_query));
|
||||
|
||||
tips_query->query_cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (GTK_WIDGET (tips_query)),
|
||||
GDK_QUESTION_ARROW);
|
||||
tips_query->query_cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (tips_query)),
|
||||
GDK_QUESTION_ARROW);
|
||||
failure = gdk_pointer_grab (GTK_WIDGET (tips_query)->window,
|
||||
TRUE,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
|
||||
|
@ -980,8 +980,8 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_KEY_PRESS_MASK);
|
||||
attributes_mask = GDK_WA_CURSOR | GDK_WA_X | GDK_WA_Y;
|
||||
attr.cursor = gdk_cursor_new_for_screen (gdk_drawable_get_screen (tree_view->priv->header_window),
|
||||
GDK_SB_H_DOUBLE_ARROW);
|
||||
attr.cursor = gdk_cursor_new_for_display (gdk_drawable_get_display (tree_view->priv->header_window),
|
||||
GDK_SB_H_DOUBLE_ARROW);
|
||||
attr.y = 0;
|
||||
attr.width = TREE_VIEW_DRAG_WIDTH;
|
||||
attr.height = tree_view->priv->header_height;
|
||||
|
@ -4846,7 +4846,7 @@ set_cursor (GtkWidget *spinner,
|
||||
else
|
||||
gtk_label_set_text (GTK_LABEL (label), "<unknown>");
|
||||
|
||||
cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (widget), c);
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), c);
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
}
|
||||
@ -10727,8 +10727,8 @@ query_properties (GtkButton *button,
|
||||
|
||||
|
||||
if (!data->cursor)
|
||||
data->cursor = gdk_cursor_new_for_screen (gtk_widget_get_screen (GTK_WIDGET (button)),
|
||||
GDK_TARGET);
|
||||
data->cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (button)),
|
||||
GDK_TARGET);
|
||||
|
||||
failure = gdk_pointer_grab (GTK_WIDGET (button)->window,
|
||||
TRUE,
|
||||
|
Loading…
Reference in New Issue
Block a user