gnome-desktop r5167 - in trunk/libgnome-desktop: . libgnomeui
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5167 - in trunk/libgnome-desktop: . libgnomeui
- Date: Mon, 11 Aug 2008 19:30:00 +0000 (UTC)
Author: federico
Date: Mon Aug 11 19:30:00 2008
New Revision: 5167
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5167&view=rev
Log:
Add function gnome_rr_screen_destroy
2008-08-11 Federico Mena Quintero <federico novell com>
* gnome-rr.c (gnome_rr_screen_destroy): New public function. We
should probably make GnomeRRScreen a GObject at some point if it
is to become public API.
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/libgnome-desktop/ChangeLog
trunk/libgnome-desktop/gnome-rr.c
trunk/libgnome-desktop/libgnomeui/gnome-rr.h
Modified: trunk/libgnome-desktop/gnome-rr.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr.c (original)
+++ trunk/libgnome-desktop/gnome-rr.c Mon Aug 11 19:30:00 2008
@@ -440,8 +440,10 @@
screen->info = screen_info_new (screen);
- if (!screen->info)
+ if (!screen->info) {
+ g_free (screen);
return NULL;
+ }
XRRSelectInput (screen->xdisplay,
screen->xroot,
@@ -462,6 +464,19 @@
}
void
+gnome_rr_screen_destroy (GnomeRRScreen *screen)
+{
+ g_return_if_fail (screen != NULL);
+
+ gdk_window_remove_filter (screen->gdk_root, screen_on_event, screen);
+
+ screen_info_free (screen->info);
+ screen->info = NULL;
+
+ g_free (screen);
+}
+
+void
gnome_rr_screen_set_size (GnomeRRScreen *screen,
int width,
int height,
Modified: trunk/libgnome-desktop/libgnomeui/gnome-rr.h
==============================================================================
--- trunk/libgnome-desktop/libgnomeui/gnome-rr.h (original)
+++ trunk/libgnome-desktop/libgnomeui/gnome-rr.h Mon Aug 11 19:30:00 2008
@@ -52,6 +52,7 @@
GnomeRRScreen * gnome_rr_screen_new (GdkScreen *screen,
GnomeRRScreenChanged callback,
gpointer data);
+void gnome_rr_screen_destroy (GnomeRRScreen *screen);
GnomeRROutput **gnome_rr_screen_list_outputs (GnomeRRScreen *screen);
GnomeRRCrtc ** gnome_rr_screen_list_crtcs (GnomeRRScreen *screen);
GnomeRRMode ** gnome_rr_screen_list_modes (GnomeRRScreen *screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]