[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114125: * xterm.h (struct x_display_info): Do not t
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r114125: * xterm.h (struct x_display_info): Do not track X connection |
Date: |
Wed, 04 Sep 2013 04:03:38 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114125
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-04 08:02:56 +0400
message:
* xterm.h (struct x_display_info): Do not track X connection
fd separately because it is always available from Display.
* xterm.c (x_term_init, x_delete_terminal, x_delete_display):
Adjust users.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
src/xterm.h xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-09-03 14:40:09 +0000
+++ b/src/ChangeLog 2013-09-04 04:02:56 +0000
@@ -1,3 +1,10 @@
+2013-09-04 Dmitry Antipov <address@hidden>
+
+ * xterm.h (struct x_display_info): Do not track X connection
+ fd separately because it is always available from Display.
+ * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
+ Adjust users.
+
2013-09-03 Dmitry Antipov <address@hidden>
* buffer.c (drop_overlay):
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2013-09-03 12:02:01 +0000
+++ b/src/xterm.c 2013-09-04 04:02:56 +0000
@@ -10170,9 +10170,6 @@
dpyinfo->x_dnd_atoms_size = 8;
dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
* dpyinfo->x_dnd_atoms_size);
-
- connection = ConnectionNumber (dpyinfo->display);
- dpyinfo->connection = connection;
dpyinfo->gray
= XCreatePixmapFromBitmapData (dpyinfo->display, dpyinfo->root_window,
gray_bits, gray_width, gray_height,
@@ -10184,6 +10181,8 @@
xsettings_initialize (dpyinfo);
+ connection = ConnectionNumber (dpyinfo->display);
+
/* This is only needed for distinguishing keyboard and process input. */
if (connection != 0)
add_keyboard_wait_descriptor (connection);
@@ -10284,8 +10283,6 @@
break;
}
- delete_keyboard_wait_descriptor (dpyinfo->connection);
-
/* Discard this display from x_display_name_list and x_display_list.
We can't use Fdelq because that can quit. */
if (! NILP (x_display_name_list)
@@ -10413,6 +10410,7 @@
x_delete_terminal (struct terminal *terminal)
{
struct x_display_info *dpyinfo = terminal->display_info.x;
+ int connection = -1;
/* Protect against recursive calls. delete_frame in
delete_terminal calls us back when it deletes our last frame. */
@@ -10431,6 +10429,8 @@
and dpyinfo->display was set to 0 to indicate that. */
if (dpyinfo->display)
{
+ connection = ConnectionNumber (dpyinfo->display);
+
x_destroy_all_bitmaps (dpyinfo);
XSetCloseDownMode (dpyinfo->display, DestroyAll);
@@ -10471,6 +10471,10 @@
#endif /* ! USE_GTK */
}
+ /* No more input on this descriptor. */
+ if (connection != -1)
+ delete_keyboard_wait_descriptor (connection);
+
/* Mark as dead. */
dpyinfo->display = NULL;
x_delete_display (dpyinfo);
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2013-09-03 12:02:01 +0000
+++ b/src/xterm.h 2013-09-04 04:02:56 +0000
@@ -138,9 +138,6 @@
/* The generic display parameters corresponding to this X display. */
struct terminal *terminal;
- /* Connection number (normally a file descriptor number). */
- int connection;
-
/* This says how to access this display in Xlib. */
Display *display;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114125: * xterm.h (struct x_display_info): Do not track X connection,
Dmitry Antipov <=