forked from AuroraMiddleware/gtk
GdkDisplay: Add a private _emit_opened
So we don't have to use the slower g_signal_emit_by_name in startup paths.
This commit is contained in:
parent
4a03e86d4f
commit
63eb3517be
@ -2217,3 +2217,9 @@ gdk_display_monitor_removed (GdkDisplay *display,
|
||||
g_signal_emit (display, signals[MONITOR_REMOVED], 0, monitor);
|
||||
gdk_monitor_invalidate (monitor);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_display_emit_opened (GdkDisplay *display)
|
||||
{
|
||||
g_signal_emit (display, signals[OPENED], 0);
|
||||
}
|
||||
|
@ -301,6 +301,7 @@ void gdk_display_monitor_added (GdkDisplay *display
|
||||
GdkMonitor *monitor);
|
||||
void gdk_display_monitor_removed (GdkDisplay *display,
|
||||
GdkMonitor *monitor);
|
||||
void gdk_display_emit_opened (GdkDisplay *display);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -584,7 +584,7 @@ _gdk_wayland_display_open (const gchar *display_name)
|
||||
|
||||
display_wayland->selection = gdk_wayland_selection_new ();
|
||||
|
||||
g_signal_emit_by_name (display, "opened");
|
||||
gdk_display_emit_opened (display);
|
||||
|
||||
return display;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "gdkglcontext-x11.h"
|
||||
#include "gdkvulkancontext-x11.h"
|
||||
#include "gdk-private.h"
|
||||
#include "gdkdisplayprivate.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
@ -1780,7 +1781,7 @@ _gdk_x11_display_open (const gchar *display_name)
|
||||
gdk_display_set_composited (GDK_DISPLAY (display),
|
||||
XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), get_cm_atom (display)) != None);
|
||||
|
||||
g_signal_emit_by_name (display, "opened");
|
||||
gdk_display_emit_opened (display);
|
||||
|
||||
return display;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user