mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
remove XSync calls from here (meta_display_ungrab): remove XSync from
2002-11-03 Havoc Pennington <hp@pobox.com> * src/display.c (meta_display_grab): remove XSync calls from here (meta_display_ungrab): remove XSync from here, but put in an XFlush to be sure we get the ungrab sent. * src/util.c (meta_topic): track sync count here * src/errors.c: move sync count out of here Throughout: error spew on all XSync() calls * src/run-metacity.sh: don't set METACITY_DEBUG
This commit is contained in:
parent
9feebc05c7
commit
e0a4c2a1df
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
|||||||
|
2002-11-03 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/display.c (meta_display_grab): remove XSync calls from here
|
||||||
|
(meta_display_ungrab): remove XSync from here, but put in
|
||||||
|
an XFlush to be sure we get the ungrab sent.
|
||||||
|
|
||||||
|
* src/util.c (meta_topic): track sync count here
|
||||||
|
|
||||||
|
* src/errors.c: move sync count out of here
|
||||||
|
|
||||||
|
Throughout: error spew on all XSync() calls
|
||||||
|
|
||||||
|
* src/run-metacity.sh: don't set METACITY_DEBUG
|
||||||
|
|
||||||
2002-11-03 Havoc Pennington <hp@pobox.com>
|
2002-11-03 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/window-props.c (meta_display_init_window_prop_hooks): add
|
* src/window-props.c (meta_display_init_window_prop_hooks): add
|
||||||
|
@ -757,10 +757,8 @@ meta_display_grab (MetaDisplay *display)
|
|||||||
{
|
{
|
||||||
if (display->server_grab_count == 0)
|
if (display->server_grab_count == 0)
|
||||||
{
|
{
|
||||||
XSync (display->xdisplay, False);
|
|
||||||
XGrabServer (display->xdisplay);
|
XGrabServer (display->xdisplay);
|
||||||
}
|
}
|
||||||
XSync (display->xdisplay, False);
|
|
||||||
display->server_grab_count += 1;
|
display->server_grab_count += 1;
|
||||||
meta_verbose ("Grabbing display, grab count now %d\n",
|
meta_verbose ("Grabbing display, grab count now %d\n",
|
||||||
display->server_grab_count);
|
display->server_grab_count);
|
||||||
@ -778,10 +776,9 @@ meta_display_ungrab (MetaDisplay *display)
|
|||||||
/* FIXME we want to purge all pending "queued" stuff
|
/* FIXME we want to purge all pending "queued" stuff
|
||||||
* at this point, such as window hide/show
|
* at this point, such as window hide/show
|
||||||
*/
|
*/
|
||||||
XSync (display->xdisplay, False);
|
|
||||||
XUngrabServer (display->xdisplay);
|
XUngrabServer (display->xdisplay);
|
||||||
|
XFlush (display->xdisplay);
|
||||||
}
|
}
|
||||||
XSync (display->xdisplay, False);
|
|
||||||
|
|
||||||
meta_verbose ("Ungrabbing display, grab count now %d\n",
|
meta_verbose ("Ungrabbing display, grab count now %d\n",
|
||||||
display->server_grab_count);
|
display->server_grab_count);
|
||||||
@ -3314,6 +3311,7 @@ convert_property (MetaDisplay *display,
|
|||||||
* can send SelectionNotify
|
* can send SelectionNotify
|
||||||
*/
|
*/
|
||||||
/* FIXME the error trap pop synced anyway, right? */
|
/* FIXME the error trap pop synced anyway, right? */
|
||||||
|
meta_topic (META_DEBUG_SYNC, "Syncing on %s\n", __FUNCTION__);
|
||||||
XSync (display->xdisplay, False);
|
XSync (display->xdisplay, False);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
16
src/errors.c
16
src/errors.c
@ -26,8 +26,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
static int sync_count = 0;
|
|
||||||
|
|
||||||
static int x_error_handler (Display *display,
|
static int x_error_handler (Display *display,
|
||||||
XErrorEvent *error);
|
XErrorEvent *error);
|
||||||
static int x_io_error_handler (Display *display);
|
static int x_io_error_handler (Display *display);
|
||||||
@ -50,7 +48,6 @@ meta_error_trap_push_internal (MetaDisplay *display,
|
|||||||
if (need_sync)
|
if (need_sync)
|
||||||
{
|
{
|
||||||
XSync (display->xdisplay, False);
|
XSync (display->xdisplay, False);
|
||||||
++sync_count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_error_trap_push ();
|
gdk_error_trap_push ();
|
||||||
@ -84,7 +81,6 @@ meta_error_trap_pop_internal (MetaDisplay *display,
|
|||||||
if (need_sync)
|
if (need_sync)
|
||||||
{
|
{
|
||||||
XSync (display->xdisplay, False);
|
XSync (display->xdisplay, False);
|
||||||
++sync_count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = gdk_error_trap_pop ();
|
result = gdk_error_trap_pop ();
|
||||||
@ -128,8 +124,8 @@ meta_error_trap_pop (MetaDisplay *display,
|
|||||||
need_sync = (display->error_traps == 1 && !last_request_was_roundtrip);
|
need_sync = (display->error_traps == 1 && !last_request_was_roundtrip);
|
||||||
|
|
||||||
if (need_sync)
|
if (need_sync)
|
||||||
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_pop, traps = %d, roundtrip = %d\n",
|
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_pop, traps = %d, roundtrip = %d\n",
|
||||||
sync_count, display->error_traps, last_request_was_roundtrip);
|
display->error_traps, last_request_was_roundtrip);
|
||||||
|
|
||||||
display->error_trap_synced_at_last_pop = need_sync || last_request_was_roundtrip;
|
display->error_trap_synced_at_last_pop = need_sync || last_request_was_roundtrip;
|
||||||
|
|
||||||
@ -156,8 +152,8 @@ meta_error_trap_push_with_return (MetaDisplay *display)
|
|||||||
need_sync = FALSE;
|
need_sync = FALSE;
|
||||||
|
|
||||||
if (need_sync)
|
if (need_sync)
|
||||||
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_push_with_return, traps = %d\n",
|
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_push_with_return, traps = %d\n",
|
||||||
sync_count, display->error_traps);
|
display->error_traps);
|
||||||
|
|
||||||
meta_error_trap_push_internal (display, FALSE);
|
meta_error_trap_push_internal (display, FALSE);
|
||||||
}
|
}
|
||||||
@ -167,8 +163,8 @@ meta_error_trap_pop_with_return (MetaDisplay *display,
|
|||||||
gboolean last_request_was_roundtrip)
|
gboolean last_request_was_roundtrip)
|
||||||
{
|
{
|
||||||
if (!last_request_was_roundtrip)
|
if (!last_request_was_roundtrip)
|
||||||
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_pop_with_return, traps = %d, roundtrip = %d\n",
|
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_pop_with_return, traps = %d, roundtrip = %d\n",
|
||||||
sync_count, display->error_traps, last_request_was_roundtrip);
|
display->error_traps, last_request_was_roundtrip);
|
||||||
|
|
||||||
display->error_trap_synced_at_last_pop = TRUE;
|
display->error_trap_synced_at_last_pop = TRUE;
|
||||||
|
|
||||||
|
@ -89,5 +89,5 @@ if test -z "$ONLY_WM"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$ONLY_SETUP"; then
|
if test -z "$ONLY_SETUP"; then
|
||||||
METACITY_VERBOSE=1 METACITY_DEBUG=1 METACITY_USE_LOGFILE=1 METACITY_DEBUG_BUTTON_GRABS=1 METACITY_DISPLAY=$CLIENT_DISPLAY exec $DEBUG ./metacity $OPTIONS
|
METACITY_VERBOSE=1 METACITY_USE_LOGFILE=1 METACITY_DEBUG_BUTTON_GRABS=1 METACITY_DISPLAY=$CLIENT_DISPLAY exec $DEBUG ./metacity $OPTIONS
|
||||||
fi
|
fi
|
||||||
|
@ -267,6 +267,8 @@ topic_name (MetaDebugTopic topic)
|
|||||||
return "Window manager";
|
return "Window manager";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int sync_count = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_topic (MetaDebugTopic topic,
|
meta_topic (MetaDebugTopic topic,
|
||||||
const char *format,
|
const char *format,
|
||||||
@ -289,6 +291,13 @@ meta_topic (MetaDebugTopic topic,
|
|||||||
|
|
||||||
if (no_prefix == 0)
|
if (no_prefix == 0)
|
||||||
fprintf (out, "%s: ", topic_name (topic));
|
fprintf (out, "%s: ", topic_name (topic));
|
||||||
|
|
||||||
|
if (topic == META_DEBUG_SYNC)
|
||||||
|
{
|
||||||
|
++sync_count;
|
||||||
|
fprintf (out, "%d: ", sync_count);
|
||||||
|
}
|
||||||
|
|
||||||
utf8_fputs (str, out);
|
utf8_fputs (str, out);
|
||||||
|
|
||||||
fflush (out);
|
fflush (out);
|
||||||
|
@ -919,6 +919,8 @@ meta_prop_get_values (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get replies for all our tasks */
|
/* Get replies for all our tasks */
|
||||||
|
meta_topic (META_DEBUG_SYNC, "Syncing to get %d GetProperty replies in %s\n",
|
||||||
|
n_values, __FUNCTION__);
|
||||||
XSync (display->xdisplay, False);
|
XSync (display->xdisplay, False);
|
||||||
|
|
||||||
/* Collect results, should arrive in order requested */
|
/* Collect results, should arrive in order requested */
|
||||||
|
Loading…
Reference in New Issue
Block a user