purge HAVE_GTK_MULTIHEAD from the source code, not just from configure.in.

2003-04-21  Havoc Pennington  <hp@redhat.com>

	* purge HAVE_GTK_MULTIHEAD from the source code, not just from
	configure.in. Yes I am a loser.
This commit is contained in:
Havoc Pennington 2003-04-21 23:37:42 +00:00 committed by Havoc Pennington
parent 0996da5e8e
commit ec9cf27a81
9 changed files with 26 additions and 69 deletions

View File

@ -1,3 +1,8 @@
2003-04-21 Havoc Pennington <hp@redhat.com>
* purge HAVE_GTK_MULTIHEAD from the source code, not just from
configure.in. Yes I am a loser.
2003-04-19 Masahiro Sakai <sakai@tom.sfc.keio.ac.jp> 2003-04-19 Masahiro Sakai <sakai@tom.sfc.keio.ac.jp>
* configure.in: call AC_LIBTOOL_WIN32_DLL. * configure.in: call AC_LIBTOOL_WIN32_DLL.

View File

@ -102,7 +102,7 @@ libmetacity_private_la_SOURCES= \
common.h common.h
libmetacity_private_la_LDFLAGS = -no-undefined libmetacity_private_la_LDFLAGS = -no-undefined
libmetacity_private_la_LIBADD = $(METACITY_LIBS) libmetacity_private_la_LIBADD = @METACITY_LIBS@
libmetacityincludedir = $(includedir)/metacity-1/metacity-private libmetacityincludedir = $(includedir)/metacity-1/metacity-private

View File

@ -528,7 +528,6 @@ meta_display_open (const char *name)
screens = NULL; screens = NULL;
#ifdef HAVE_GTK_MULTIHEAD
i = 0; i = 0;
while (i < ScreenCount (xdisplay)) while (i < ScreenCount (xdisplay))
{ {
@ -540,14 +539,6 @@ meta_display_open (const char *name)
screens = g_slist_prepend (screens, screen); screens = g_slist_prepend (screens, screen);
++i; ++i;
} }
#else
{
MetaScreen *screen;
screen = meta_screen_new (display, DefaultScreen (xdisplay));
if (screen)
screens = g_slist_prepend (screens, screen);
}
#endif
display->screens = screens; display->screens = screens;

View File

@ -48,7 +48,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
if (tip == NULL) if (tip == NULL)
{ {
tip = gtk_window_new (GTK_WINDOW_POPUP); tip = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
{ {
GdkScreen *gdk_screen; GdkScreen *gdk_screen;
@ -59,10 +58,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
screen_width = gdk_screen_get_width (gdk_screen); screen_width = gdk_screen_get_width (gdk_screen);
screen_height = gdk_screen_get_height (gdk_screen); screen_height = gdk_screen_get_height (gdk_screen);
} }
#else
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
#endif
gtk_widget_set_app_paintable (tip, TRUE); gtk_widget_set_app_paintable (tip, TRUE);
gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE); gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);

View File

@ -452,7 +452,6 @@ meta_frames_calc_geometry (MetaFrames *frames,
MetaFrames* MetaFrames*
meta_frames_new (int screen_number) meta_frames_new (int screen_number)
{ {
#ifdef HAVE_GTK_MULTIHEAD
GdkScreen *screen; GdkScreen *screen;
screen = gdk_display_get_screen (gdk_display_get_default (), screen = gdk_display_get_screen (gdk_display_get_default (),
@ -461,11 +460,6 @@ meta_frames_new (int screen_number)
return g_object_new (META_TYPE_FRAMES, return g_object_new (META_TYPE_FRAMES,
"screen", screen, "screen", screen,
NULL); NULL);
#else
return g_object_new (META_TYPE_FRAMES,
NULL);
#endif
} }
void void
@ -835,21 +829,15 @@ meta_frames_apply_shapes (MetaFrames *frames,
Window shape_window; Window shape_window;
Window client_window; Window client_window;
Region client_xregion; Region client_xregion;
#ifdef HAVE_GTK_MULTIHEAD
GdkScreen *screen; GdkScreen *screen;
#endif
int screen_number; int screen_number;
meta_topic (META_DEBUG_SHAPES, meta_topic (META_DEBUG_SHAPES,
"Frame 0x%lx needs to incorporate client shape\n", "Frame 0x%lx needs to incorporate client shape\n",
frame->xwindow); frame->xwindow);
#ifdef HAVE_GTK_MULTIHEAD
screen = gtk_widget_get_screen (GTK_WIDGET (frames)); screen = gtk_widget_get_screen (GTK_WIDGET (frames));
screen_number = gdk_x11_screen_get_screen_number (screen); screen_number = gdk_x11_screen_get_screen_number (screen);
#else
screen_number = DefaultScreen (gdk_display);
#endif
attrs.override_redirect = True; attrs.override_redirect = True;
@ -1057,11 +1045,8 @@ show_tip_now (MetaFrames *frames)
/* get conversion delta for root-to-frame coords */ /* get conversion delta for root-to-frame coords */
dx = root_x - x; dx = root_x - x;
dy = root_y - y; dy = root_y - y;
#ifdef HAVE_GTK_MULTIHEAD
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames))); screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
#else
screen_number = DefaultScreen (gdk_display);
#endif
meta_fixed_tip_show (gdk_display, meta_fixed_tip_show (gdk_display,
screen_number, screen_number,
rect->x + dx, rect->x + dx,

View File

@ -241,10 +241,10 @@ meta_window_menu_new (MetaFrames *frames,
menu->insensitive = insensitive; menu->insensitive = insensitive;
menu->menu = gtk_menu_new (); menu->menu = gtk_menu_new ();
#ifdef HAVE_GTK_MULTIHEAD
gtk_menu_set_screen (GTK_MENU (menu->menu), gtk_menu_set_screen (GTK_MENU (menu->menu),
gtk_widget_get_screen (GTK_WIDGET (frames))); gtk_widget_get_screen (GTK_WIDGET (frames)));
#endif
i = 0; i = 0;
while (i < (int) G_N_ELEMENTS (menuitems)) while (i < (int) G_N_ELEMENTS (menuitems))
{ {
@ -321,20 +321,12 @@ meta_window_menu_new (MetaFrames *frames,
GtkWidget *mi; GtkWidget *mi;
Display *display; Display *display;
Window xroot; Window xroot;
GdkScreen *screen;
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window); display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
#ifdef HAVE_GTK_MULTIHEAD screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
{ xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
GdkScreen *screen;
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
}
#else
{
xroot = gdk_x11_get_default_root_xwindow ();
}
#endif
i = 0; i = 0;
while (i < n_workspaces) while (i < n_workspaces)

View File

@ -92,11 +92,10 @@ ensure_size_window (MetaResizePopup *popup)
return; return;
popup->size_window = gtk_window_new (GTK_WINDOW_POPUP); popup->size_window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->size_window), gtk_window_set_screen (GTK_WINDOW (popup->size_window),
gdk_display_get_screen (gdk_x11_lookup_xdisplay (popup->display), gdk_display_get_screen (gdk_x11_lookup_xdisplay (popup->display),
popup->screen_number)); popup->screen_number));
#endif
/* never shrink the size window */ /* never shrink the size window */
gtk_window_set_resizable (GTK_WINDOW (popup->size_window), gtk_window_set_resizable (GTK_WINDOW (popup->size_window),

View File

@ -122,11 +122,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
popup = g_new (MetaTabPopup, 1); popup = g_new (MetaTabPopup, 1);
popup->outline_window = gtk_window_new (GTK_WINDOW_POPUP); popup->outline_window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->outline_window), gtk_window_set_screen (GTK_WINDOW (popup->outline_window),
gdk_display_get_screen (gdk_display_get_default (), gdk_display_get_screen (gdk_display_get_default (),
screen_number)); screen_number));
#endif
gtk_widget_set_app_paintable (popup->outline_window, TRUE); gtk_widget_set_app_paintable (popup->outline_window, TRUE);
gtk_widget_realize (popup->outline_window); gtk_widget_realize (popup->outline_window);
@ -135,11 +134,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
G_CALLBACK (outline_window_expose), popup); G_CALLBACK (outline_window_expose), popup);
popup->window = gtk_window_new (GTK_WINDOW_POPUP); popup->window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->window), gtk_window_set_screen (GTK_WINDOW (popup->window),
gdk_display_get_screen (gdk_display_get_default (), gdk_display_get_screen (gdk_display_get_default (),
screen_number)); screen_number));
#endif
gtk_window_set_position (GTK_WINDOW (popup->window), gtk_window_set_position (GTK_WINDOW (popup->window),
GTK_WIN_POS_CENTER_ALWAYS); GTK_WIN_POS_CENTER_ALWAYS);

View File

@ -290,21 +290,16 @@ meta_image_window_new (Display *xdisplay,
int max_height) int max_height)
{ {
MetaImageWindow *iw; MetaImageWindow *iw;
GdkDisplay *gdisplay;
GdkScreen *gscreen;
iw = g_new (MetaImageWindow, 1); iw = g_new (MetaImageWindow, 1);
iw->window = gtk_window_new (GTK_WINDOW_POPUP); iw->window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD gdisplay = gdk_x11_lookup_xdisplay (xdisplay);
{ gscreen = gdk_display_get_screen (gdisplay, screen_number);
GdkDisplay *gdisplay;
GdkScreen *gscreen;
gdisplay = gdk_x11_lookup_xdisplay (xdisplay); gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
gscreen = gdk_display_get_screen (gdisplay, screen_number);
gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
}
#endif
gtk_widget_realize (iw->window); gtk_widget_realize (iw->window);
iw->pixmap = gdk_pixmap_new (iw->window->window, iw->pixmap = gdk_pixmap_new (iw->window->window,
@ -391,11 +386,8 @@ get_cmap (GdkPixmap *pixmap)
else else
{ {
meta_verbose ("Using system cmap to snapshot pixmap\n"); meta_verbose ("Using system cmap to snapshot pixmap\n");
#ifdef HAVE_GTK_MULTIHEAD
cmap = gdk_screen_get_system_colormap (gdk_drawable_get_screen (pixmap)); cmap = gdk_screen_get_system_colormap (gdk_drawable_get_screen (pixmap));
#else
cmap = gdk_colormap_get_system ();
#endif
g_object_ref (G_OBJECT (cmap)); g_object_ref (G_OBJECT (cmap));
} }
} }