[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xterm.c
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/src/xterm.c |
Date: |
Sun, 13 Jul 2003 13:27:52 -0400 |
Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.800 emacs/src/xterm.c:1.801
*** emacs/src/xterm.c:1.800 Tue Jul 8 18:00:53 2003
--- emacs/src/xterm.c Sun Jul 13 13:27:51 2003
***************
*** 534,540 ****
int x, y0, y1;
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
!
XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->output_data.x->normal_gc, x, y0, x, y1);
}
--- 534,540 ----
int x, y0, y1;
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
!
XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->output_data.x->normal_gc, x, y0, x, y1);
}
***************
*** 3988,3994 ****
x_send_scroll_bar_event (window_being_scrolled,
scroll_bar_end_scroll, 0, 0);
w = XWINDOW (window_being_scrolled);
!
if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
{
XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
--- 3988,3994 ----
x_send_scroll_bar_event (window_being_scrolled,
scroll_bar_end_scroll, 0, 0);
w = XWINDOW (window_being_scrolled);
!
if (!NILP (XSCROLL_BAR (w->vertical_scroll_bar)->dragging))
{
XSCROLL_BAR (w->vertical_scroll_bar)->dragging = Qnil;
***************
*** 6725,6731 ****
do this one, the right one will come later.
The toolkit version doesn't seem to need this, but we
need to reset it below. */
! int dont_resize
= ((f->want_fullscreen & FULLSCREEN_WAIT)
&& f->new_text_cols != 0);
int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f,
event.xconfigure.height);
--- 6725,6731 ----
do this one, the right one will come later.
The toolkit version doesn't seem to need this, but we
need to reset it below. */
! int dont_resize
= ((f->want_fullscreen & FULLSCREEN_WAIT)
&& f->new_text_cols != 0);
int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f,
event.xconfigure.height);
***************
*** 7464,7487 ****
if (FRAME_X_WINDOW (f) == 0)
return 1;
! /* Free up our existing icon bitmap if any. */
if (f->output_data.x->icon_bitmap > 0)
x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
f->output_data.x->icon_bitmap = 0;
if (STRINGP (file))
! bitmap_id = x_create_bitmap_from_file (f, file);
else
{
! /* Create the GNU bitmap if necessary. */
if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
! FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
! = x_create_bitmap_from_data (f, gnu_bits,
! gnu_width, gnu_height);
! /* The first time we create the GNU bitmap,
this increments the ref-count one extra time.
! As a result, the GNU bitmap is never freed.
That way, we don't have to worry about allocating it again. */
x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
--- 7464,7499 ----
if (FRAME_X_WINDOW (f) == 0)
return 1;
! /* Free up our existing icon bitmap and mask if any. */
if (f->output_data.x->icon_bitmap > 0)
x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
f->output_data.x->icon_bitmap = 0;
if (STRINGP (file))
! {
! #ifdef USE_GTK
! /* Use gtk_window_set_icon_from_file() if available,
! It's not restricted to bitmaps */
! if (!xg_set_icon(f, file))
! return 0;
! #endif /* USE_GTK */
! bitmap_id = x_create_bitmap_from_file (f, file);
! x_create_bitmap_mask(f, bitmap_id);
! }
else
{
! /* Create the GNU bitmap and mask if necessary. */
if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
! {
! FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id
! = x_create_bitmap_from_data (f, gnu_bits,
! gnu_width, gnu_height);
! x_create_bitmap_mask(f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
! }
! /* The first time we create the GNU bitmap and mask,
this increments the ref-count one extra time.
! As a result, the GNU bitmap and mask are never freed.
That way, we don't have to worry about allocating it again. */
x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id);
***************
*** 9296,9302 ****
struct frame *f;
int pixmap_id;
{
! Pixmap icon_pixmap;
#ifndef USE_X_TOOLKIT
Window window = FRAME_OUTER_WINDOW (f);
--- 9308,9314 ----
struct frame *f;
int pixmap_id;
{
! Pixmap icon_pixmap, icon_mask;
#ifndef USE_X_TOOLKIT
Window window = FRAME_OUTER_WINDOW (f);
***************
*** 9306,9311 ****
--- 9318,9325 ----
{
icon_pixmap = x_bitmap_pixmap (f, pixmap_id);
f->output_data.x->wm_hints.icon_pixmap = icon_pixmap;
+ icon_mask = x_bitmap_mask (f, pixmap_id);
+ f->output_data.x->wm_hints.icon_mask = icon_mask;
}
else
{
***************
*** 9318,9323 ****
--- 9332,9338 ----
best to explicitly give up. */
#if 0
f->output_data.x->wm_hints.icon_pixmap = None;
+ f->output_data.x->wm_hints.icon_mask = None;
#else
return;
#endif
***************
*** 9329,9339 ****
Arg al[1];
XtSetArg (al[0], XtNiconPixmap, icon_pixmap);
XtSetValues (f->output_data.x->widget, al, 1);
}
#else /* not USE_X_TOOLKIT */
! f->output_data.x->wm_hints.flags |= IconPixmapHint;
XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
#endif /* not USE_X_TOOLKIT */
--- 9344,9356 ----
Arg al[1];
XtSetArg (al[0], XtNiconPixmap, icon_pixmap);
XtSetValues (f->output_data.x->widget, al, 1);
+ XtSetArg (al[0], XtNiconMask, icon_mask);
+ XtSetValues (f->output_data.x->widget, al, 1);
}
#else /* not USE_X_TOOLKIT */
! f->output_data.x->wm_hints.flags |= (IconPixmapHint | IconMaskHint);
XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
#endif /* not USE_X_TOOLKIT */
***************
*** 10523,10529 ****
|| !strcmp (SDATA (value), "on")))
XSynchronize (dpyinfo->display, True);
}
!
{
Lisp_Object value;
value = display_x_get_resource (dpyinfo,
--- 10540,10546 ----
|| !strcmp (SDATA (value), "on")))
XSynchronize (dpyinfo->display, True);
}
!
{
Lisp_Object value;
value = display_x_get_resource (dpyinfo,