mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
macos: fix various compiler warnings
This commit is contained in:
parent
eae5eaeb21
commit
f32ae2964a
@ -512,7 +512,7 @@ _gdk_macos_display_surface_became_key (GdkMacosDisplay *self,
|
||||
* ("is not key"). We send a dummy motion notify event now, so that
|
||||
* everything in the window is set to correct state.
|
||||
*/
|
||||
gdk_surface_request_motion (surface);
|
||||
gdk_surface_request_motion (GDK_SURFACE (surface));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -525,8 +525,8 @@ select_thread_start_poll (GPollFD *ufds,
|
||||
have_new_pollfds = TRUE;
|
||||
else
|
||||
{
|
||||
if (!((nfds == 1 && poll_fd_index < 0 && g_thread_supported ()) ||
|
||||
(nfds == 2 && poll_fd_index >= 0 && g_thread_supported ())))
|
||||
if (!((nfds == 1 && poll_fd_index < 0) ||
|
||||
(nfds == 2 && poll_fd_index >= 0)))
|
||||
select_thread_set_state (POLLING_RESTART);
|
||||
}
|
||||
}
|
||||
|
@ -150,14 +150,14 @@ ensure_gl_view (GdkMacosGLContext *self)
|
||||
|
||||
if (self->dummy_view != NULL)
|
||||
{
|
||||
NSView *nsview = g_steal_pointer (&self->dummy_view);
|
||||
[nsview release];
|
||||
NSView *dummy_view = g_steal_pointer (&self->dummy_view);
|
||||
[dummy_view release];
|
||||
}
|
||||
|
||||
if (self->dummy_window != NULL)
|
||||
{
|
||||
NSWindow *nswindow = g_steal_pointer (&self->dummy_window);
|
||||
[nswindow release];
|
||||
NSWindow *dummy_window = g_steal_pointer (&self->dummy_window);
|
||||
[dummy_window release];
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,7 +288,6 @@ gdk_macos_gl_context_begin_frame (GdkDrawContext *context,
|
||||
|
||||
if (self->dummy_view != NULL)
|
||||
{
|
||||
GdkSurface *surface = gdk_draw_context_get_surface (context);
|
||||
NSRect frame = NSMakeRect (0, 0, surface->width, surface->height);
|
||||
|
||||
[self->dummy_window setFrame:frame display:NO];
|
||||
@ -327,18 +326,10 @@ gdk_macos_gl_context_end_frame (GdkDrawContext *context,
|
||||
cairo_region_t *painted)
|
||||
{
|
||||
GdkMacosGLContext *self = GDK_MACOS_GL_CONTEXT (context);
|
||||
GdkMacosSurface *surface;
|
||||
NSView *nsview;
|
||||
cairo_rectangle_int_t extents;
|
||||
|
||||
g_assert (GDK_IS_MACOS_GL_CONTEXT (self));
|
||||
g_assert (self->gl_context != nil);
|
||||
|
||||
surface = GDK_MACOS_SURFACE (gdk_draw_context_get_surface (context));
|
||||
nsview = self->dummy_view ?
|
||||
self->dummy_view :
|
||||
_gdk_macos_surface_get_view (surface);
|
||||
|
||||
GDK_DRAW_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->end_frame (context, painted);
|
||||
|
||||
/* We want to limit how much gets moved to the front buffer so here
|
||||
|
@ -185,7 +185,7 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl,
|
||||
if (register_session)
|
||||
{
|
||||
quartz->delegate = [[GtkApplicationQuartzDelegate alloc] initWithImpl:quartz];
|
||||
[NSApp setDelegate: quartz->delegate];
|
||||
[NSApp setDelegate: (id<NSApplicationDelegate>)quartz->delegate];
|
||||
}
|
||||
|
||||
quartz->muxer = gtk_action_muxer_new (NULL);
|
||||
@ -216,7 +216,7 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl,
|
||||
* app menu at index 0 in 'combined'.
|
||||
*/
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/libgtk/ui/gtkapplication-quartz.ui");
|
||||
app_menu = G_MENU (gtk_builder_get_object (builder, "app-menu"));
|
||||
app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "app-menu"));
|
||||
g_object_set_data_full (G_OBJECT (impl), "APP_DATA", g_object_ref (app_menu), g_object_unref);
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ filechooser_quartz_launch (FileChooserQuartzData *data)
|
||||
|
||||
void (^handler)(NSInteger ret) = ^(NSInteger result) {
|
||||
|
||||
if (result == NSFileHandlingPanelOKButton)
|
||||
if (result == NSModalResponseOK)
|
||||
{
|
||||
// get selected files and update data->files
|
||||
data->response = GTK_RESPONSE_ACCEPT;
|
||||
|
Loading…
Reference in New Issue
Block a user