macos: Use the new debug macros

This commit is contained in:
Matthias Clasen 2022-09-22 21:32:54 -04:00
parent ce4c2154f4
commit 1f166ae071
8 changed files with 107 additions and 113 deletions

View File

@ -90,19 +90,19 @@
-(BOOL)acceptsFirstResponder
{
GDK_NOTE (EVENTS, g_message ("acceptsFirstResponder"));
GDK_DEBUG (EVENTS, "acceptsFirstResponder");
return YES;
}
-(BOOL)becomeFirstResponder
{
GDK_NOTE (EVENTS, g_message ("becomeFirstResponder"));
GDK_DEBUG (EVENTS, "becomeFirstResponder");
return YES;
}
-(BOOL)resignFirstResponder
{
GDK_NOTE (EVENTS, g_message ("resignFirstResponder"));
GDK_DEBUG (EVENTS, "resignFirstResponder");
return YES;
}
@ -141,7 +141,7 @@
GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
GDK_NOTE (EVENTS, g_message ("keyDown"));
GDK_DEBUG (EVENTS, "keyDown");
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
}
@ -151,7 +151,7 @@
-(NSUInteger)characterIndexForPoint:(NSPoint)aPoint
{
GDK_NOTE (EVENTS, g_message ("characterIndexForPoint"));
GDK_DEBUG (EVENTS, "characterIndexForPoint");
return 0;
}
@ -159,7 +159,7 @@
{
GdkRectangle *rect;
GDK_NOTE (EVENTS, g_message ("firstRectForCharacterRange"));
GDK_DEBUG (EVENTS, "firstRectForCharacterRange");
if ((rect = g_object_get_data (G_OBJECT ([self gdkSurface]), GIC_CURSOR_RECT)))
{
@ -178,37 +178,37 @@
-(NSArray *)validAttributesForMarkedText
{
GDK_NOTE (EVENTS, g_message ("validAttributesForMarkedText"));
GDK_DEBUG (EVENTS, "validAttributesForMarkedText");
return [NSArray arrayWithObjects: NSUnderlineStyleAttributeName, nil];
}
-(NSAttributedString *)attributedSubstringForProposedRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
{
GDK_NOTE (EVENTS, g_message ("attributedSubstringForProposedRange"));
GDK_DEBUG (EVENTS, "attributedSubstringForProposedRange");
return nil;
}
-(BOOL)hasMarkedText
{
GDK_NOTE (EVENTS, g_message ("hasMarkedText"));
GDK_DEBUG (EVENTS, "hasMarkedText");
return markedRange.location != NSNotFound && markedRange.length != 0;
}
-(NSRange)markedRange
{
GDK_NOTE (EVENTS, g_message ("markedRange"));
GDK_DEBUG (EVENTS, "markedRange");
return markedRange;
}
-(NSRange)selectedRange
{
GDK_NOTE (EVENTS, g_message ("selectedRange"));
GDK_DEBUG (EVENTS, "selectedRange");
return selectedRange;
}
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_message ("unmarkText"));
GDK_DEBUG (EVENTS, "unmarkText");
selectedRange = NSMakeRange (0, 0);
markedRange = NSMakeRange (NSNotFound, 0);
@ -220,7 +220,7 @@
{
const char *str;
GDK_NOTE (EVENTS, g_message ("setMarkedText"));
GDK_DEBUG (EVENTS, "setMarkedText");
if (replacementRange.location == NSNotFound)
{
@ -246,9 +246,9 @@
TIC_SELECTED_LEN,
GUINT_TO_POINTER (selectedRange.length));
GDK_NOTE (EVENTS, g_message ("setMarkedText: set %s (%p, nsview %p): %s",
GDK_DEBUG (EVENTS, "setMarkedText: set %s (%p, nsview %p): %s",
TIC_MARKED_TEXT, [self gdkSurface], self,
str ? str : "(empty)"));
str ? str : "(empty)");
/* handle text input changes by mouse events */
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT ([self gdkSurface]), TIC_IN_KEY_DOWN)))
@ -257,7 +257,7 @@
-(void)doCommandBySelector:(SEL)aSelector
{
GDK_NOTE (EVENTS, g_message ("doCommandBySelector"));
GDK_DEBUG (EVENTS, "doCommandBySelector");
if ([self respondsToSelector: aSelector])
[self performSelector: aSelector];
@ -268,7 +268,7 @@
const char *str;
NSString *string;
GDK_NOTE (EVENTS, g_message ("insertText"));
GDK_DEBUG (EVENTS, "insertText");
if ([self hasMarkedText])
[self unmarkText];
@ -294,9 +294,9 @@
}
g_object_set_data_full (G_OBJECT ([self gdkSurface]), TIC_INSERT_TEXT, g_strdup (str), g_free);
GDK_NOTE (EVENTS, g_message ("insertText: set %s (%p, nsview %p): %s",
GDK_DEBUG (EVENTS, "insertText: set %s (%p, nsview %p): %s",
TIC_INSERT_TEXT, [self gdkSurface], self,
str ? str : "(empty)"));
str ? str : "(empty)");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -309,7 +309,7 @@
-(void)deleteBackward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteBackward"));
GDK_DEBUG (EVENTS, "deleteBackward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -318,7 +318,7 @@
-(void)deleteForward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteForward"));
GDK_DEBUG (EVENTS, "deleteForward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -327,7 +327,7 @@
-(void)deleteToBeginningOfLine:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteToBeginningOfLine"));
GDK_DEBUG (EVENTS, "deleteToBeginningOfLine");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -336,7 +336,7 @@
-(void)deleteToEndOfLine:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteToEndOfLine"));
GDK_DEBUG (EVENTS, "deleteToEndOfLine");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -345,7 +345,7 @@
-(void)deleteWordBackward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteWordBackward"));
GDK_DEBUG (EVENTS, "deleteWordBackward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -354,7 +354,7 @@
-(void)deleteWordForward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("deleteWordForward"));
GDK_DEBUG (EVENTS, "deleteWordForward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -363,7 +363,7 @@
-(void)insertBacktab:(id)sender
{
GDK_NOTE (EVENTS, g_message ("insertBacktab"));
GDK_DEBUG (EVENTS, "insertBacktab");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -372,7 +372,7 @@
-(void)insertNewline:(id)sender
{
GDK_NOTE (EVENTS, g_message ("insertNewline"));
GDK_DEBUG (EVENTS, "insertNewline");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -381,7 +381,7 @@
-(void)insertTab:(id)sender
{
GDK_NOTE (EVENTS, g_message ("insertTab"));
GDK_DEBUG (EVENTS, "insertTab");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -390,7 +390,7 @@
-(void)moveBackward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveBackward"));
GDK_DEBUG (EVENTS, "moveBackward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -399,7 +399,7 @@
-(void)moveBackwardAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveBackwardAndModifySelection"));
GDK_DEBUG (EVENTS, "moveBackwardAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -408,7 +408,7 @@
-(void)moveDown:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveDown"));
GDK_DEBUG (EVENTS, "moveDown");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -417,7 +417,7 @@
-(void)moveDownAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveDownAndModifySelection"));
GDK_DEBUG (EVENTS, "moveDownAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -426,7 +426,7 @@
-(void)moveForward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveForward"));
GDK_DEBUG (EVENTS, "moveForward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -435,7 +435,7 @@
-(void)moveForwardAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveForwardAndModifySelection"));
GDK_DEBUG (EVENTS, "moveForwardAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -444,7 +444,7 @@
-(void)moveLeft:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveLeft"));
GDK_DEBUG (EVENTS, "moveLeft");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -453,7 +453,7 @@
-(void)moveLeftAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveLeftAndModifySelection"));
GDK_DEBUG (EVENTS, "moveLeftAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -462,7 +462,7 @@
-(void)moveRight:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveRight"));
GDK_DEBUG (EVENTS, "moveRight");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -471,7 +471,7 @@
-(void)moveRightAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveRightAndModifySelection"));
GDK_DEBUG (EVENTS, "moveRightAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -480,7 +480,7 @@
-(void)moveToBeginningOfDocument:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocument"));
GDK_DEBUG (EVENTS, "moveToBeginningOfDocument");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -489,7 +489,7 @@
-(void)moveToBeginningOfDocumentAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfDocumentAndModifySelection"));
GDK_DEBUG (EVENTS, "moveToBeginningOfDocumentAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -498,7 +498,7 @@
-(void)moveToBeginningOfLine:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLine"));
GDK_DEBUG (EVENTS, "moveToBeginningOfLine");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -507,7 +507,7 @@
-(void)moveToBeginningOfLineAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToBeginningOfLineAndModifySelection"));
GDK_DEBUG (EVENTS, "moveToBeginningOfLineAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -516,7 +516,7 @@
-(void)moveToEndOfDocument:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocument"));
GDK_DEBUG (EVENTS, "moveToEndOfDocument");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -525,7 +525,7 @@
-(void)moveToEndOfDocumentAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToEndOfDocumentAndModifySelection"));
GDK_DEBUG (EVENTS, "moveToEndOfDocumentAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -534,7 +534,7 @@
-(void)moveToEndOfLine:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToEndOfLine"));
GDK_DEBUG (EVENTS, "moveToEndOfLine");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -543,7 +543,7 @@
-(void)moveToEndOfLineAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveToEndOfLineAndModifySelection"));
GDK_DEBUG (EVENTS, "moveToEndOfLineAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -552,7 +552,7 @@
-(void)moveUp:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveUp"));
GDK_DEBUG (EVENTS, "moveUp");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -561,7 +561,7 @@
-(void)moveUpAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveUpAndModifySelection"));
GDK_DEBUG (EVENTS, "moveUpAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -570,7 +570,7 @@
-(void)moveWordBackward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordBackward"));
GDK_DEBUG (EVENTS, "moveWordBackward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -579,7 +579,7 @@
-(void)moveWordBackwardAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordBackwardAndModifySelection"));
GDK_DEBUG (EVENTS, "moveWordBackwardAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -588,7 +588,7 @@
-(void)moveWordForward:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordForward"));
GDK_DEBUG (EVENTS, "moveWordForward");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -597,7 +597,7 @@
-(void)moveWordForwardAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordForwardAndModifySelection"));
GDK_DEBUG (EVENTS, "moveWordForwardAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -606,7 +606,7 @@
-(void)moveWordLeft:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordLeft"));
GDK_DEBUG (EVENTS, "moveWordLeft");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -615,7 +615,7 @@
-(void)moveWordLeftAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordLeftAndModifySelection"));
GDK_DEBUG (EVENTS, "moveWordLeftAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -624,7 +624,7 @@
-(void)moveWordRight:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordRight"));
GDK_DEBUG (EVENTS, "moveWordRight");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -633,7 +633,7 @@
-(void)moveWordRightAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("moveWordRightAndModifySelection"));
GDK_DEBUG (EVENTS, "moveWordRightAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -642,7 +642,7 @@
-(void)pageDown:(id)sender
{
GDK_NOTE (EVENTS, g_message ("pageDown"));
GDK_DEBUG (EVENTS, "pageDown");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -651,7 +651,7 @@
-(void)pageDownAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("pageDownAndModifySelection"));
GDK_DEBUG (EVENTS, "pageDownAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -660,7 +660,7 @@
-(void)pageUp:(id)sender
{
GDK_NOTE (EVENTS, g_message ("pageUp"));
GDK_DEBUG (EVENTS, "pageUp");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -669,7 +669,7 @@
-(void)pageUpAndModifySelection:(id)sender
{
GDK_NOTE (EVENTS, g_message ("pageUpAndModifySelection"));
GDK_DEBUG (EVENTS, "pageUpAndModifySelection");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -678,7 +678,7 @@
-(void)selectAll:(id)sender
{
GDK_NOTE (EVENTS, g_message ("selectAll"));
GDK_DEBUG (EVENTS, "selectAll");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -687,7 +687,7 @@
-(void)selectLine:(id)sender
{
GDK_NOTE (EVENTS, g_message ("selectLine"));
GDK_DEBUG (EVENTS, "selectLine");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -696,7 +696,7 @@
-(void)selectWord:(id)sender
{
GDK_NOTE (EVENTS, g_message ("selectWord"));
GDK_DEBUG (EVENTS, "selectWord");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,
@ -705,7 +705,7 @@
-(void)noop: (id)sender
{
GDK_NOTE (EVENTS, g_message ("noop"));
GDK_DEBUG (EVENTS, "noop");
g_object_set_data (G_OBJECT ([self gdkSurface]),
GIC_FILTER_KEY,

View File

@ -217,11 +217,10 @@ gdk_display_link_source_new (CGDirectDisplayID display_id,
}
name = _gdk_macos_monitor_get_connector_name (display_id);
GDK_NOTE (MISC,
g_message ("Monitor \"%s\" discovered with Refresh Rate %d and Interval %"G_GINT64_FORMAT,
GDK_DEBUG (MISC, "Monitor \"%s\" discovered with Refresh Rate %d and Interval %"G_GINT64_FORMAT,
name ? name : "unknown",
impl->refresh_rate,
impl->refresh_interval));
impl->refresh_interval);
g_free (name);
/* Wire up our callback to be executed within the high-priority thread. */

View File

@ -156,9 +156,8 @@ gdk_macos_display_update_bounds (GdkMacosDisplay *self)
self->width = self->max_x - self->min_x;
self->height = self->max_y - self->min_y;
GDK_NOTE (MISC,
g_message ("Displays reconfigured to bounds %d,%d %dx%d",
self->min_x, self->min_y, self->width, self->height));
GDK_DEBUG (MISC, "Displays reconfigured to bounds %d,%d %dx%d",
self->min_x, self->min_y, self->width, self->height);
GDK_END_MACOS_ALLOC_POOL;
}
@ -663,7 +662,7 @@ _gdk_macos_display_open (const char *display_name)
return NULL;
display_name = display_name ? display_name : "";
GDK_NOTE (MISC, g_message ("opening display %s", display_name));
GDK_DEBUG (MISC, "opening display %s", display_name);
/* Make the current process a foreground application, i.e. an app
* with a user interface, in case we're not running from a .app bundle

View File

@ -214,7 +214,7 @@ select_thread_set_state (SelectThreadState new_state)
if (select_thread_state == new_state)
return;
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Select thread state: %s => %s", state_names[select_thread_state], state_names[new_state]));
GDK_DEBUG (EVENTLOOP, "EventLoop: Select thread state: %s => %s", state_names[select_thread_state], state_names[new_state]);
old_state = select_thread_state;
select_thread_state = new_state;
@ -225,7 +225,7 @@ select_thread_set_state (SelectThreadState new_state)
static void
signal_main_thread (void)
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Waking up main thread"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Waking up main thread");
/* If we are in nextEventMatchingMask, then we need to make sure an
* event gets queued, otherwise it's enough to simply wake up the
@ -384,7 +384,7 @@ dump_poll_result (GPollFD *ufds,
g_string_append (s, "\n");
}
}
g_message ("%s", s->str);
gdk_debug_message ("%s", s->str);
g_string_free (s, TRUE);
}
#endif
@ -439,7 +439,7 @@ select_thread_start_poll (GPollFD *ufds,
if (nfds == 0 ||
(nfds == 1 && poll_fd_index >= 0))
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Nothing to poll"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Nothing to poll");
return 0;
}
@ -458,7 +458,7 @@ select_thread_start_poll (GPollFD *ufds,
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_EVENTLOOP) && n_ready > 0)
{
g_message ("EventLoop: Found ready file descriptors before waiting");
gdk_debug_message ("EventLoop: Found ready file descriptors before waiting");
dump_poll_result (ufds, nfds);
}
#endif
@ -537,7 +537,7 @@ select_thread_start_poll (GPollFD *ufds,
if (have_new_pollfds)
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Submitting a new set of file descriptor to the select thread"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Submitting a new set of file descriptor to the select thread");
g_assert (next_pollfds == NULL);
@ -602,7 +602,7 @@ select_thread_collect_poll (GPollFD *ufds, guint nfds)
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_EVENTLOOP)
{
g_message ("EventLoop: Found ready file descriptors after waiting");
gdk_debug_message ("EventLoop: Found ready file descriptors after waiting");
dump_poll_result (ufds, nfds);
}
#endif
@ -842,7 +842,7 @@ run_loop_entry (void)
{
if (g_main_context_acquire (NULL))
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Beginning tracking run loop activity"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Beginning tracking run loop activity");
acquired_loop_level = current_loop_level;
}
else
@ -857,7 +857,7 @@ run_loop_entry (void)
* thread that does g_main_context_wait() and then wakes us back up, but
* the gain doesn't seem worth the complexity.
*/
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Can't acquire main loop; skipping tracking run loop activity"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Can't acquire main loop; skipping tracking run loop activity");
}
}
}
@ -895,7 +895,7 @@ run_loop_before_sources (void)
if (g_main_context_check (context, max_priority, run_loop_pollfds, nfds))
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Dispatching high priority sources"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Dispatching high priority sources");
g_main_context_dispatch (context);
}
}
@ -938,7 +938,7 @@ run_loop_before_waiting (void)
* expires. We do this by adding a dummy timer that we'll remove immediately
* after the wait wakes up.
*/
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Adding timer to wake us up in %d milliseconds", timeout));
GDK_DEBUG (EVENTLOOP, "EventLoop: Adding timer to wake us up in %d milliseconds", timeout);
run_loop_timer = CFRunLoopTimerCreate (NULL, /* allocator */
CFAbsoluteTimeGetCurrent () + timeout / 1000.,
@ -978,7 +978,7 @@ run_loop_after_waiting (void)
if (g_main_context_check (context, run_loop_max_priority, run_loop_pollfds, run_loop_n_pollfds))
{
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Dispatching after waiting"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Dispatching after waiting");
g_main_context_dispatch (context);
}
}
@ -991,7 +991,7 @@ run_loop_exit (void)
{
g_main_context_release (NULL);
acquired_loop_level = -1;
GDK_NOTE (EVENTLOOP, g_message ("EventLoop: Ended tracking run loop activity"));
GDK_DEBUG (EVENTLOOP, "EventLoop: Ended tracking run loop activity");
}
}

View File

@ -398,10 +398,9 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
}
}
GDK_DISPLAY_NOTE (display,
OPENGL,
g_message ("Creating CGLContextObj (version %d.%d)",
major, minor));
GDK_DISPLAY_DEBUG (display, OPENGL,
"Creating CGLContextObj (version %d.%d)",
major, minor);
if (!(pixelFormat = create_pixel_format (major, minor, error)))
return 0;
@ -441,11 +440,10 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
CGLEnable (cgl_context, kCGLCESwapRectangle);
}
GDK_DISPLAY_NOTE (display,
OPENGL,
g_message ("Created CGLContextObj@%p using %s",
GDK_DISPLAY_DEBUG (display, OPENGL,
"Created CGLContextObj@%p using %s",
cgl_context,
get_renderer_name (renderer_id)));
get_renderer_name (renderer_id));
self->cgl_context = g_steal_pointer (&cgl_context);

View File

@ -1152,10 +1152,9 @@ _gdk_macos_surface_monitor_changed (GdkMacosSurface *self)
if (g_set_object (&self->best_monitor, best))
{
GDK_NOTE (MISC,
g_message ("Surface \"%s\" moved to monitor \"%s\"",
GDK_DEBUG (MISC, "Surface \"%s\" moved to monitor \"%s\"",
self->title ? self->title : "unknown",
gdk_monitor_get_connector (best)));
gdk_monitor_get_connector (best));
_gdk_macos_surface_configure (self);

View File

@ -188,12 +188,11 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
_gdk_macos_surface_set_geometry_hints (GDK_MACOS_SURFACE (self), &geometry, mask);
gdk_surface_constrain_size (&geometry, mask, width, height, &width, &height);
GDK_NOTE (MISC,
g_message ("Resizing \"%s\" to %dx%d",
GDK_DEBUG (MISC, "Resizing \"%s\" to %dx%d",
GDK_MACOS_SURFACE (self)->title ?
GDK_MACOS_SURFACE (self)->title :
"untitled",
width, height));
width, height);
_gdk_macos_surface_resize (GDK_MACOS_SURFACE (self), width, height);
@ -225,12 +224,11 @@ _gdk_macos_toplevel_surface_present (GdkToplevel *toplevel,
GDK_MACOS_SURFACE (self),
&x, &y);
GDK_NOTE (MISC,
g_message ("Placing new toplevel \"%s\" at %d,%d",
GDK_DEBUG (MISC, "Placing new toplevel \"%s\" at %d,%d",
GDK_MACOS_SURFACE (self)->title ?
GDK_MACOS_SURFACE (self)->title :
"untitled",
x, y));
x, y);
_gdk_macos_surface_move (GDK_MACOS_SURFACE (self), x, y);
}

View File

@ -24,6 +24,7 @@
#include "gtk/gtkimcontextquartz.h"
#include "gtk/gtkintl.h"
#include "gtk/gtkimmoduleprivate.h"
#include "gtk/gtkprivate.h"
#include "gdk/macos/gdkmacos.h"
#include "gdk/macos/gdkmacosdisplay-private.h"