[maemo-commits] [maemo-commits] r9829 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildonwm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Feb 13 18:07:26 EET 2007
- Previous message: [maemo-commits] r9828 - projects/haf/branches/dbus/0.x/trunk/test/data/valid-config-files
- Next message: [maemo-commits] r9830 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart
Date: 2007-02-13 18:07:25 +0200 (Tue, 13 Feb 2007)
New Revision: 9829
Modified:
projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
Log:
* libhildonwm/hd-wm.c:
- Check status of fullscreen whenever you get active/last_active
window.
- trap X errors when getting _NET_WM_STATE property
* ChangeLog updated.
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-02-13 15:30:40 UTC (rev 9828)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog 2007-02-13 16:07:25 UTC (rev 9829)
@@ -1,5 +1,12 @@
2007-02-13 Moises Martinez <moises.martinez at nokia.com>
+ * libhildonwm/hd-wm.c:
+ - Check status of fullscreen whenever you get active/last_active
+ window.
+ - trap X errors when getting _NET_WM_STATE property
+
+2007-02-13 Moises Martinez <moises.martinez at nokia.com>
+
* src/hd-panel-window-dialog.c:
- Connected to fullscreen libhildonwm's signal
* libhildonwm/hd-wm.c:
Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2007-02-13 15:30:40 UTC (rev 9828)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c 2007-02-13 16:07:25 UTC (rev 9829)
@@ -2119,18 +2119,34 @@
static void
hd_wm_check_net_state (HDWM *hdwm, HDWMWatchedWindow *win)
{
- Window xid = hd_wm_watched_window_get_x_win (win);
+ Window xid;
unsigned long n;
unsigned long extra;
int format, status, i;
Atom realType, *value = NULL;
+ if (hdwm == NULL)
+ hdwm = hd_wm_get_singleton ();
+
+ if (win == NULL)
+ return;
+
+ xid = hd_wm_watched_window_get_x_win (win);
+
+ gdk_error_trap_push ();
+
status = XGetWindowProperty(GDK_DISPLAY (), xid,
hdwm->priv->atoms[HD_ATOM_NET_WM_STATE],
0L, 1000000L,
0, XA_ATOM, &realType, &format,
&n, &extra, (unsigned char **) &value);
+ if (gdk_error_trap_pop ())
+ {
+ g_debug ("Some watched window view closed can be the cause");
+ return;
+ }
+
if (status == Success)
{
if (realType == XA_ATOM && format == 32 && n > 0)
@@ -2784,6 +2800,8 @@
HDWMWatchedWindow *
hd_wm_get_active_window(void)
{
+if (hdwmpriv->active_window)
+ hd_wm_check_net_state (NULL,hdwmpriv->active_window);
return hdwmpriv->active_window;
}
@@ -2799,6 +2817,10 @@
HDWMWatchedWindow *
hd_wm_get_last_active_window(void)
{
+
+ if (hdwmpriv->last_active_window)
+ hd_wm_check_net_state (NULL,hdwmpriv->last_active_window);
+
return hdwmpriv->last_active_window;
}
- Previous message: [maemo-commits] r9828 - projects/haf/branches/dbus/0.x/trunk/test/data/valid-config-files
- Next message: [maemo-commits] r9830 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
