[prev in list] [next in list] [prev in thread] [next in thread]
List: moblin-commits
Subject: [Moblin-Commits] moblin-compiz-plugins: Changes to 'master'
From: rusty () moblin ! org (Rusty Lynch)
Date: 2008-06-26 1:02:52
Message-ID: 20080626010252.A908092C1A4 () moblin ! org
[Download RAW message or body]
This email list is read-only. Emails sent to this list will be discarded
----------------------------------
pep/pep.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 42 insertions(+), 5 deletions(-)
New commits:
commit 7a1158df56ed4c11953f8bc3b66f6ec2d1dc9248
Author: Rusty Lynch <rusty.lynch@intel.com>
Date: Wed Jun 25 18:02:10 2008 -0700
* Landing some more prototyping code, nothing exciting yet
Diff in this email is a maximum of 400 lines.
diff --git a/pep/pep.c b/pep/pep.c
index 8550366..2a2d7f7 100644
--- a/pep/pep.c
+++ b/pep/pep.c
@@ -2,12 +2,18 @@
#include "pep_options.h"
#include <compiz-core.h>
+#include <X11/Xatom.h>
#include <X11/extensions/XTest.h>
static CompMetadata pepMetadata;
static int displayPrivateIndex;
static int pepCorePrivateIndex;
+#define ACCESS_CLASS "_MOBLIN_ACCESS"
+#define STATE_CLASS "_MOBLIN_STATE"
+#define APP_CLASS "_MOBLIN_APP"
+#define BG_CLASS "_MOBLIN_BG"
+
#define DEBUG 1
#ifndef DEBUG
@@ -26,6 +32,9 @@ typedef struct _PEPDisplay {
int screenPrivateIndex;
HandleEventProc handleEvent;
int active;
+ CompWindow *access_window;
+ CompWindow *active_application_window;
+ CompWindow *background_window;
CompOption opt[PEP_DISPLAY_OPTION_NUM];
} PEPDisplay;
@@ -127,6 +136,7 @@ static inline PEPDisplay *getPEPDisplay(CompDisplay *d)
static void pepHandleEvent (CompDisplay *d, XEvent *event)
{
PEPDisplay *pep_display;
+ CompWindow *w = findWindowAtDisplay(d, event->xproperty.window);
pep_display = getPEPDisplay(d);
if (!pep_display->active || (event->xany.send_event == True))
@@ -134,13 +144,15 @@ static void pepHandleEvent (CompDisplay *d, XEvent *event)
switch (event->type) {
case FocusIn:
- DPRINT("FocusIn Event");
+ if (w)
+ DPRINT("FocusIn Event >> %s/%s",
+ w->resName, w->resClass);
break;
case MapNotify:
DPRINT("MapNotify");
break;
case ButtonPress:
- DPRINT("ButtonPress");
+ DPRINT("(%p) ButtonPress", pep_display);
break;
case ButtonRelease:
DPRINT("ButtonRelease");
@@ -154,6 +166,28 @@ static void pepHandleEvent (CompDisplay *d, XEvent *event)
case MotionNotify:
DPRINT("MotionNotify");
break;
+ case PropertyNotify:
+ DPRINT("PropertyNotify: %s", XGetAtomName(d->display, event->xproperty.atom));
+ if (event->xproperty.atom == XA_WM_CLASS) {
+ //CompWindow *w = findWindowAtDisplay(d, event->xproperty.window);
+ if (w) {
+ XClassHint classHint;
+ if (XGetClassHint (d->display,
+ w->id,
+ &classHint)) {
+ if (classHint.res_name) {
+ DPRINT("NAME: %s", classHint.res_name);
+ XFree(classHint.res_name);
+ }
+
+ if (classHint.res_class) {
+ DPRINT("CLASS: %s", classHint.res_class);
+ XFree (classHint.res_class);
+ }
+ }
+ }
+ }
+ break;
default:
goto end;
}
@@ -192,7 +226,9 @@ static Bool pepInitDisplay(CompPlugin *p, CompDisplay *d)
DPRINT("Out of memory!");
return FALSE;
}
-
+
+ DPRINT("pep_display = %p", pep_display);
+
if (!compInitDisplayOptionsFromMetadata (d,
&pepMetadata,
pepDisplayOptionInfo,
@@ -268,14 +304,15 @@ static Bool pepInitWindow (CompPlugin *p, CompWindow *w)
PEPWindow *pep_window;
PEP_SCREEN(w->screen);
- DPRINT("Window id: %i", (int)(w->id));
-
pep_window = malloc (sizeof (PEPWindow));
if (!pep_window) {
DPRINT("Our-of-memory");
return FALSE;
}
+ DPRINT("New window >> id = %i, name = %s, class = %s",
+ (int)w->id, w->resName, w->resClass);
+
w->base.privates[pep_screen->windowPrivateIndex].ptr = pep_window;
return TRUE;
}
_______________________________________________
Commits mailing list
Commits@moblin.org
https://www.moblin.org/mailman/listinfo/commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic