2008-06-06 Alex Graveley * configure.in: Bump version to 0.2.2. Bump maxversion to 3.0 from 3.0pre, and use 'ff3' in the .xpi name instead of 'minefield'. * compzilla/src/compzillaRenderingContext.cpp (GetThebesSurface): Add this new abstract method, which sets mGfxSurf as the out param. 2008-04-05 Alex Graveley * configure.in: Bump maxVersion to 3.0pre. Yay! * compzilla/src/compzillaWindow.cpp (SendMouseEvent): Fix libcompzilla loading issues with recent Firefox3, probably due to changes in String API exportation in libxul. CompzillaWindow used the nsIFrame to get window<->screen coordinates, but nsIFrame.h and its dependencies used internal string classes which led to link errrors. So instead we just use the cached Xwindow property data to offset event coordinates, which works okay. 2008-04-05 Alex Graveley * compzilla/src/compzillaWindow.cpp: Make it work with FF2 also. Why, I bother trying to support this anymore, who knows? * compzilla/src/compzillaRenderingContext.cpp (Redraw): Use nsIDeviceContext::AppUnitsPerCSSPixel instead of the disappeared GetPrimaryCanvasFrame()->PresContext()->AppUnitsPerCSSPixel(). * configure.in: Support up to 3.0b5pre. #ifdef MOZ_CAIRO_GFX -> MOZ_TREE_CAIRO to check for cairo-based rendering. 2007-10-03 Alex Graveley * configure.in: Bump version to 0.2.1. Bump Minefield support to 3.0a9pre/3.0a9. * compzilla/src/compzillaIRenderingContextInternal.h: Split out compzillaIRenderingContextInternal decl to here. * compzilla/src/compzillaRenderingContext.h/cpp: Conform to new Minefield canvas backend API. * compzilla/src/compzillaRenderingContextFx2.h/cpp: Split out ff2 canvas rendering context to here, since the interface for Minefield has diverged. * compzilla/public/compzillaIControl.idl: Fix bug in compzillaIControl uuid which causes conflcts when users have mugshot installed. * compzilla/public/compzillaIRenderingContext.idl: Ditto. 2007-08-19 Alex Graveley * configure.in: Bump version to 0.2. * README: Tell people to generate an xpi and install it. * NEWS: Update for 0.2. 2007-08-19 Alex Graveley * compzilla/install.rdf.in: Add this, copied from install.rdf with a bunch of keys set from configure variables. * configure.in: Define min/maxversion to be used in generated install.rdf. 2007-08-11 Alex Graveley Fix minefield build: * compzilla/src/compzillaRenderingContext.cpp: Include nsMemory.h. * compzilla/src/compzillaRenderingContext.h: Include nsIFrame.h. 2007-08-10 Alex Graveley * compzilla/chrome/skin/compzilla.css: Handle ARGB windows correctly by setting the background-color transparent for .windowContent children of .uiDlgContentCenter. This makes cairo-clock look good. * compzilla/chrome/skin/flickrdemo.css: Remove backgroung transparency on #flickrWindow. * compzilla/src/compzillaControl.cpp (Filter): Don't be picky about ungrab notification: always reenable the overlay input. This should hopefully fix the occasional loss of input, where ungrab notification isn't sent to the root window. 2007-08-09 Alex Graveley Add a simple window resize cache to avoid pipelining multiple XConfigureWindow calls before a ConfigureNotify arrives for the last one. * compzilla/src/compzillaWindow.cpp (Configured): Call SendPendingResize. (SendPendingResize): Send the pending resize since the last ConfigureNotify, or reset mIsResizePending if we're already at the requested size. (QueueResize): Set the requested size, and if a resize isn't already pending, call SendPendingResize to send it. * compzilla/src/compzillaControl.cpp (Configure): Call QueueResize if the window is known. 2007-08-03 Alex Graveley * compzilla/src/compzillaControl.cpp: Clean this up, and remove all the helper functions, calling compzillaWindow methods directly. Store the DOM window as an X window instead of GdkWindow. (GetEventXWindow): New, returns the window an X event operates on. 2007-08-01 Alex Graveley * compzilla/src/compzillaControl.cpp (PrintEvent): Fix crash caused by printing a pointer as %s, use 0x%0x instead of %p while we're here. 2007-08-01 Alex Graveley * compzilla/src/compzillaControl.cpp (GetNativeWidget): Don't use nsIScriptGlobalObject/nsPIDOMWindow to get the docshell, use the nsIWebNavigation instead. 2007-08-01 Alex Graveley * compzilla/chrome/content/flickrdemo.xul: Add a simple so we can test nested browser opening. * compzilla/chrome/content/start.xul: set hidechrome=true, windowtype="navigator:desktop", and drop width/height. This is just cleanup, and maybe seems to help speed on Minefield for me. * compzilla/chrome/content/start.js: Add compzillaInitContent which sets the default content listener to the new _compzillaContentListener which denies all requests to navigate away from the desktop. 2007-07-31 Alex Graveley Include everywhere so we build with latest Minefield sources. 2007-07-30 Alex Graveley * compzilla/chrome.manifest: Add flickrdemo.xul as an overlay to start.xul. * compzilla/chrome/content/flickrdemo.js: Add load handler to create flickrDemo window: can't access XUL overlay-added DOM elements without this. * compzilla/chrome/skin/compzilla.css: Remove flickdemo stuff, moved to new flickrdemo.css. * compzilla/chrome/content/start.xul: Remove flickdemo stuff, moved to new flickrdemo.xul. 2007-07-27 Chris Toshok * compzilla/chrome/content/start.xul: move the loading of debug.js to the front of the list (just below jquery) so it should catch all syntax/etc errors from .js files loaded further down. * compzilla/chrome/content/start.js (compzillaLoad): call initDebugWindow here. * compzilla/chrome/content/debug.js: put the frame creation stuff in initDebugWindow, so we can move debug.js near the front of the loaded .js files in start.xul. This is so we can install the window.onerror handler in this file which redirects js errors to our debug window. 2007-07-25 Alex Graveley * compzilla/install.rdf: Undo the last changes, but now understanding more: We actually need to match an exact number for minVersion, so use 2.0.0.1. Edgy's "2.0" doesn't seem to work, so require at least a point release after that. Also, there's not going to be an SSL cert for pyrodesktop.org any time soon, so just comment out the updateURL again. We'll use addons.mozilla.org hosting, which let's auto-updating work without an updateURL anyway. 2007-07-25 Alex Graveley * compzilla/src/compzillaWindow.cpp (RemoveContentNode): Don't generate errors here, always return NS_OK. This is what other moz observers seem to do. (AddObserver): Ditto. * compzilla/src/compzillaControl.cpp (AddObserver): Enumerate all existing windows and call CreateWindow for each on the observer. (RemoveObserver): Always return NS_OK. * compzilla/install.rdf: Uncomment updateURL and make it https, so the next release will actually suggest an update for itself. Doh. Bump firefox minVersion to 2.0.0.*. 2007-07-22 Chris Toshok * compzilla/chrome/content/flickrdemo.js, compzilla/chrome/content/start.xul, compzilla/chrome/skin/compzilla.css: add 2 more status bar states - updating and updatefailed. provide different css classes for each, and switch between them at the right times. 2007-07-22 Chris Toshok * compzilla/Makefile.am (content_DATA): add the flickrdemo stuffs. * compzilla/chrome/content/start.xul: same. * compzilla/chrome/content/flickrdemo.js: same. * compzilla/chrome/skin/compzilla.css: same. 2007-07-21 Alex Graveley * compzilla/chrome/content/start.js: Remove calls to promptReplaceWindowManager, as the browser overlay will do this, and if you run firefox with the chrome url directly, you want to replace the WM anyway. * compzilla/chrome/content/prompt.js: In promptReplaceWindowManager, use "Replace" as the button label, and add a "Always perform this check when starting" checkbox which starts checked, and if unchecked will set "compzilla.replace_existing_wm", to true. * compzilla/defaults/preferences/prefs.js: Add compzilla.autostart, and compzilla.replace_existing_wm, which both default to false. * compzilla/chrome/locale/en-US/browserOverlay.dtd: New, entities for the browser overlay. * compzilla/chrome/content/browserOverlay.js: New file, loaded at browser launch, and call autoStartCompzilla to automatically launch compzilla if the "compzilla.autostart" pref is true (defaults to false), and it's the first window. startCompzilla calls promptReplaceWindowManager if there's a WM, and window.openDialog to launch compzilla if accepted. * compzilla/chrome/content/browserOverlay.xul: New file, overlay browser.xul. Add startup code in browserOverlay.js. Add a Tools menu item, "Start Pyro Desktop", which calls startCompzilla. * compzilla/chrome.manifest: Add browserOverlay.xul. 2007-07-18 Chris Toshok * compzilla/chrome/content/picker.js: prefix variables so they don't conflict. * compzilla/chrome/content/nihanim.js: allow animations to have "completed" methods as well. 2007-07-17 Alex Graveley * compzilla/src/compzillaWindow.cpp (CZ_NewCompzillaWindow): Take xwin attrs at construction, so caller can avoid creating objects for e.g. InputOnly windows. (AddContentNode): Set initial size to window's dimensions. (Resized): Pull out pixmap replacement to here, called on ConfigureNotify. Call Damage to refresh all the content too. * compzilla/src/compzillaControl.cpp (PrintEvent): Separate out Xevent debug printing to here. Drop forget window. Just use DestroyWindow until the thing actually get destroyed. (Filter): Try to call XCheckTypedWindowEvent for destroy/reparent on window create, so we can avoid showing a create/delete/jitter. Do the same for map/unmap. Shot in the dark to avoid showing panel applet windows breifly before they are reparented. * compzilla/chrome/content/frame.js: In moveResizeToContent, just toggle the display instead of visibility too. No need to call _updateContentSize in show(). * compzilla/chrome/content/start.js: Be more cautious when creating content/frame by catching exceptions. * compzilla/public/compzillaIControl.idl: Drop the *Window from function names. Add Kill call. 2007-07-17 Alex Graveley * compzilla/chrome/content/minmax.js: Don't resize the canvas for now, and set the left/top after the animation finishes. * compzilla/chrome/content/frame.js: Hide the window and remove it from the stack first, before removing the observer, and calling ondestroy. 2007-07-15 Chris Toshok * compzilla/chrome/skin/compzilla.css: change the picker background a tiny bit (darker), and make the selection rectangle a little lighter. Also, always set the 2 pixel border on pickerItems, just have it be transparent in the non-selected case. We lose the small popping difference in size (which is sort of a pleasing animation) when an item is selected, but it makes things faster than changing the border widths of items as we animate. 2007-07-15 Chris Toshok * compzilla/chrome/content/scale.js: remove the old callback_count stuff. also do more precomputation outside of the animation tick callback, and make the animations a little longer (from 250ms to 400ms). try to keep mouse events from propagating to the scaled windows (which is admitted pretty cool, since the're properly transformed and everything), but it doesn't work. * compzilla/chrome/skin/compzilla.css: make the backgrounds in expose and picker less opaque. darkening the screen so much instantly is very jarring. use a more subtle darkening. also, put a thicker border around the picker, the same color as the background of the window. with the canvas gradient, it provides a nice look. 2007-07-15 Chris Toshok * compzilla/Makefile.am (content_DATA): add nihanim.js * compzilla/chrome/skin/compzilla.css: new style foo. * compzilla/chrome/content/start.xul: use the layer background hack for expose, since we'll need to change the opacity of the selected window to 1.0 when it's highlighted. also load nihanim.js. * compzilla/chrome/content/scale.js: rework this, getting rid of all the jquery animation calls and switching to nih. also remove the multitude of animations we were using. now everything except the window moving happens instantaneously. no more fading windows in/out, it just slows things down. Also, make sure we don't start a new animation before the current one is finished, and provide a way to select windows in scaled out mode, and have that focus them and trigger a scale in (i.e. make it actually useful). * compzilla/chrome/content/picker.js: use the nihanim stuff. * compzilla/chrome/content/nihanim.js: abstract out the animation crap i wrote in picker.js and put it here. make it a little more generally useful. now you can hook up several animations (which are basically just objects with an updateProgress call) - something the scale plugin uses. All animations are assumed to start when you call NIHStoryboard.start(), but they can end at different times. 2007-07-14 Chris Toshok * compzilla/chrome/content/util.js: add getElementById, where element.getElementById("id") does what the following jquery accomplishes: $("#id", element)[0]. * compzilla/chrome/content/picker.js: fuck jQuery. remove all references to it. use a specialized animator for moving the picker machinery, which fixes loads of things and runs a lot faster. also, set the width/height attributes on the canvases so they don't look squished. they're chopped off instead, which is definitely more pleasing to the eye than the tiny snapshots you see with e.g. compiz. also, set a flag when we're animating so we don't start another one and screw ourselves up. use the completed function to set it back to false. lastly, use an attribute instead of a css class to switch between selected states. I think that's everything. welcome to the new hotness. * start.xul, compzilla.css: tune some of the picker stuff. the biggest change here is the addition of another pickerlayer child which is what sets a background color/opacity. the picker itself is opaque. the pickerLayer is completely transparent. This allows us the illusion of a child whose opacity overrides that of its parent. 2007-07-14 Chris Toshok * compzilla/chrome/content/frame.js: just call doFocus in the mousedown handler instead of focus. * compzilla/chrome/content/start.xul: remove the tabindex. * compzilla/chrome/content/picker.js: call doFocus instead of focus(). also, factor out the initial setting of the style. * compzilla/chrome/skin/compzilla.css: set the picker item overflow to hidden and use a sane font. 2007-07-14 Chris Toshok * compzilla/chrome/content/frame.js: split out the focus handling from the mousedown handler to frame.doFocus. add a "focus" event handler which calls doFocus, and do nothing in the mousedown event handler except focus the frame. * compzilla/chrome/content/start.xul: add tabindex to the uidlgs. * compzilla/chrome/content/picker.js: specify durations for the animations, and make sure the selected picker item is centered. Also, focus the selected window when we're done. * compzilla/chrome/skin/compzilla.css: add some padding between the border and contents of the picker items. also remove the focus outline from uiDlg. 2007-07-13 Alex Graveley * compzilla/src/compzillaControl.cpp/h: Define some nserrors which can be returned from RegisterWindowManager. Don't require RENDER, since we don't use it directly. * compzilla/chrome/content/start.js: Alert with friendly messages when RegisterWindowManager raises an exception. 2007-07-10 Alex Graveley * compzilla/src/compzillaWindow.cpp (GetUTF8StringProperty): Take a nsACString so we can just assign the UTF8 version of the fetched string. (GetProperty): Use nsCAutoString for visible utf8 strings. * compzilla/Makefile.am (libcompzilla_la_CPPFLAGS): Add fvisibility=hidden, so we don't add any symbols to further slow down moz linking. * compzilla/src/compzillaControl.cpp (InitWindowState): Don't select cursor input, since it's useless with the overlay window. * compzilla/chrome/content/frame.js: Fix sizing bug where content needed to be forced +30 pixels of Y offset. In moveResizeToContent, don't constrain size to work area for windows that have strut info set. 2007-07-09 Alex Graveley * compzilla/src/Debug.h: Switch to using PR_LOG. The module name is "compzilla". Set NSPR_LOG_MODULES="compzilla:5" in your environment to get debugging output. 2007-07-08 Alex Graveley * compzilla/src/Debug.h: Pull out debug printing defines to here. 2007-07-08 Alex Graveley * compzilla/chrome/content/start.js: If a window manager is running, call promptReplaceWindowManager. Always call promptSetDefaultWindowManager for now. In the future, this should be inhibitable with a checkbox. * compzilla/chrome/content/prompt.js: New file, contains user prompting code. (promptReplaceWindowManager): Ask the user if they want to replace their existing window manager. (promptSetDefaultWindowManager): If the nsIGConfService is available, prompt to set pyro as the default WM. This is broken currently, as the gnome-wm script, which looks at the gconf value we set, expects it to be a single file name. We need to bundle a run-compzilla.sh script with the extension to fix this. * compzilla/chrome/content/content.js: In wmStruts getter, catch exception on access of _PARTIAL. * compzilla/chrome/content/frame.js: Don't set frame title from icon name. * compzilla/Makefile.am (content_DATA): Add prompt.js. * compzilla/src/compzillaControl.cpp (ReplaceSelectionOwner): Do the proper dance to replace the current WM and compmgr. Call this from InitManagerWindow. Remove unused mRoot member. (HasWindowManager): New, returns true if there is a WM running. 2007-07-06 Alex Graveley * compzilla/Makefile.am (%.h %.xpt): Combine idl processing rules. * compzilla/src/compzillaRenderingContext.cpp (Render): Go back to using a gfxPattern and PixelSnappedRectangleAndSetPattern. Not really sure which is better. Fail if there's no surface created yet. 2007-07-06 Alex Graveley * compzilla/install.rdf: Update a bit, point to chrome/content/pyrologo.png for install logo. * Makefile.am: Add xpi target. * compzilla/chrome/content/pyrologo.png: Lil 32x32 icon. 2007-07-05 Alex Graveley * compzilla/Makefile.am: Add $(GFX_CFLAGS) and set it to -DMOZILLA_INTERNAL_API for non-thebes builds so we work with FF2 again. Only link libxpistub or libxpcomglue_s, not libgkgfx or libthebes, since they don't exist in static builds. * compzilla/src/compzillaRenderingContext.cpp: Grosshack to support static FF2 builds, where nsTransform2D API isn't exported. So we do the #define private public hack so we can access the contents directly from CZ_TransformNoXLate. 2007-07-03 Alex Graveley * compzilla/src/compzillaWindow.cpp: Add SPEW_EVENT, to avoid clogging stdout, and do some cleanup on the debug output. * compzilla/src/compzillaControl.cpp (Filter): Don't spew on motion events for the same reason. 2007-07-03 Alex Graveley * compzilla/src/compzillaWindow.cpp (DestroyWindow): Handle reentrancy while calling Destroy on observers. 2007-07-03 Alex Graveley * compzilla/chrome/content/start.js: Add _NET_WM_ICON and _NET_WM_ICON_NAME as supported. * compzilla/chrome/content/xprops.js: Remove the "fillers" functions and instead enumerate the properties in the property bag and insert them into a standard JS object. If there's only one property and it's called "atom", "text", or "data", return it directly. Also, use an observer on the native window to invalidate the cached values. * compzilla/chrome/content/frame.js: Set title when *ICON_NAME is set. Don't call Invalidate on content.XProps, as this is handled automatically by xprops.js now. Handle _NET_WM_ICON but just Debug() for now. * compzilla/chrome/content/minmax.js: Use getNativeProperty. * compzilla/chrome/content/content.js: Expose xprops via getNativeProperty. Add wmIcon property. * compzilla/src/compzillaWindow.cpp (GetProperty): Don't prefix property bag names with ".". Set strut "partial" flag here, instead of in xprops.js. Handle _NET_WM_ICON, by storing the content as a string. 2007-07-02 Alex Graveley * compzilla/chrome/content/frame.js: Handle ICON_NAME xprop changes using the "moz-icon://stock/?size=16" scheme to lookup gtk icon theme icons for window frames. * compzilla/chrome/content/content.js: Add wmIconName property that represents _NET_WM_ICON_NAME or XA_WM_ICON_NAME. * compzilla/chrome/skin/compzilla.css: Make chromeless windows have .9 opacity, and hide the resize grip. * compzilla/src/compzillaControl.cpp: Listen for XFixesCursorNotify events, and print a spew. 2007-07-01 Alex Graveley * compzilla/Makefile.am: Pass distcheck. * compzilla/chrome/content/windowStack.js: * compzilla/chrome/content/xprops.js: * compzilla/chrome/content/debug.js: * compzilla/chrome/content/atoms.js: * compzilla/chrome/content/util.js: Fixup simple js warnings caught by Firefox. 2007-07-01 Alex Graveley * compzilla/src/compzillaControl.cpp (InitWindowState): Set the root window cursor, used when windows don't specify one. 2007-07-01 Alex Graveley * compzilla/src/compzillaControl.cpp: InitOutputWindow -> InitOverlay. Replace Show/HideOutputWindow with ShowOverlay. * configure.in, compzilla/src/compzillaControl.cpp/h, compzilla/src/compzillaWindow.cpp/h, run-xephyr.sh: Remove unused Xevie cruft. Xevie support lives on in the "xevie" SVN branch. 2007-07-01 Alex Graveley * compzilla/chrome/content/frame.js (moveResizeToContent): Constrain location/size to workarea's size. Hardcode y-=30 for now to get correct menu placement working. 2007-07-01 Alex Graveley * compzilla/Makefile.am (EXTRA_DIST): Set this so we can pass distcheck. 2007-07-01 Alex Graveley * compzilla/src/compzillaControl.cpp/h, compzilla/src/compzillaWindow.cpp/h: Remove OVERLAY_INPUT_REGION code, which tries to create an nsDisplayList for the active Xwindow's visible regions, and set the overlay's input mask to allow input to flow through to the underlying window. 2007-07-01 Alex Graveley * compzilla/Makefile.am (skin_DATA): Remove desktop.html. (libcompzilla_la_LDFLAGS): Add -Wl,-Bsymbolic, which extensions build with inside the moz tree. (libcompzilla_la_LIBADD): Add NSPR_LIBS and -lxpcomglue_s. We need a better solution to this since Ubuntu/Debian? doesn't include libxpcomglue_s in it's devel pkg. * compzilla/chrome/skin/desktop.html: Remove this, the desktop background is now specified using CSS. 2007-07-01 Alex Graveley * compzilla/components/compzillaWindowManager.js: Remove this, it's no longer used since we moved to the event/observer model for native->js comm. * compzilla/src/compzillaEventManager.cpp, compzilla/src/compzillaWindowEvents.cpp, compzilla/src/compzillaEventManager.h, compzilla/src/compzillaWindowEvents.h, compzilla/public/compzillaIWindowEvents.idl: Delete these old files held over from the event-based attempt, before we switched to using observers. 2007-06-27 Alex Graveley * compzilla/chrome/content/atoms.js (Atoms): Intern _NET_VIRTUAL_ROOTS. Fixup some JS var bugs. 2007-06-27 Alex Graveley * compzilla/src/compzillaControl.cpp (ConvertNsRegion): Add. (SetOverlayInput): Add. (SetRootWindowProperty): Call SetOverlayInput in response to _NET_ACTIVE_WINDOW changes, if OVERLAY_INPUT_REGION is defined. (AddWindow): Don't call MapWindow from here. * compzilla/src/compzillaWindow.cpp (SendMouseEvent): Call XGrabKey to match XGrabButton. (EnsurePixmap): Drop the UpdateAttributes here. (WindowConfigured): Call WindowDamaged with the full contents if the size has changed. Add GetDisplayRegion to fill an nsRegion list with the exposed rectangles. Call MapWindow if the window is already visible. 2007-06-25 Alex Graveley * compzilla/chrome/content/content.js: Set the style.display to "block" right away. Set style.visibility in onshow/hide. * compzilla/chrome/content/frame.js: Use _PYRO_NAMESPACE instead of duplicting the string. (moveResizeToContent) Toggle visibility of the frame so we can get accurate offsets if it's hidden. Don't call _content.onshow/hide for override_redirect windows. 2007-06-20 Alex Graveley * compzilla/src/compzillaControl.cpp: Don't use MOZILLA_INTERNAL_API. * compzilla/src/compzillaEventManager.h: Ditto. * compzilla/src/compzillaWindowEvents.h: Ditto. * compzilla/src/compzillaWindow.cpp: Ditto. * compzilla/src/compzillaRenderingContext.hcpp: Ditto. Work around bugs in nsICanvasRenderingContextInternal.h which includes private string classes by #defineing the string header include checks, and aliasing nsAFlatCString to nsACString, which is missed by nsStringAPI.h. * compzilla/src/compzillaRenderingContext.cpp: Ditto. Don't store the gfxPattern, and just call DrawSurface which is basically the same as calling NewPath-PixelSnappedRectangleAndSetPattern-Fill, I think. Also, for non-thebes Firefox, use the NATIVE_CAIRO_CONTEXT instead of NATIVE_GDK_DRAWABLE. * compzilla/src/compzillaModule.cpp: Ditto. 2007-06-20 Alex Graveley * compzilla/chrome/content/start.xul: Make windowContent have a class of windowContent, and use this in compzilla.css instead of the id. * compzilla/public/compzillaIWindow.idl: Make Add/RemoveContentNode take a nsIDOMHTMLCanvasElement instead of an nsISupports. * compzilla/src/compzillaWindow.cpp (SendMouseEvent): Ungrab the pointer and start a passive grab on the window. Makes menus work a little better. XSelectInput for LeaveWindowMask also as Enter. 2007-06-18 Alex Graveley * COPYING: Add MPL/GPL/LGPL tri-license text. * compzilla/chrome/skin/meebo/COPYING: Add GPL license text. 2007-06-12 Alex Graveley * compzilla/compzilla.in: Run @FIREFOX@. * configure.in: Check for xpidl in libdir and exec_prefix. Check for firefox in exec_prefix and exec_prefix/bin. This let's us build against mozilla build trees and system installed packages. 2007-06-09 Alex Graveley * compzilla/src/compzillaRenderingContext.cpp (SetDrawable): Create xlib surface/pattern here, and use it from Render. Vlad says creating these can be costly. 2007-06-03 Chris Toshok * compzilla/public/compzillaIControl.idl: add MoveToTop/MoveToBottom. * compzilla/chrome/content/content.js: handle onmovetotop and onmovetobottom by calling svc.MoveToTop and svc.MoveToBottom, respectively. * compzilla/chrome/content/windowStack.js: call content.onmovetotop, content.onmovetobottom, and content.onmoveabove. * compzilla/src/compzillaControl.cpp (MoveToTop): new method. (MoveToBottom): same. 2007-05-31 Alex Graveley * compzilla/src/compzillaControl.cpp (Filter): Call XCheckTypedEvent in a loop to aggregate pending damage events. Seems to make keypresses feel faster. Also, remove the calls to GDK_DRAWABLE_XID(mRoot) everywhere, and just cache the value. 2007-05-31 Alex Graveley * compzilla/chrome/content/xprops.js: Make this awesome too. 2007-05-31 Alex Graveley * compzilla/src/compzillaWindow.cpp (GetSubwindowAtPoint): Make this more robust to failures, avoiding infinite loops if the window has disappeared. (SendMouseEvent): Fix mouse clicks by using GetTarget instead of GetCurrentTarget. Previously, with FF 2.0.0.3+, motion events would work correctly, but clicks were always relative to 0,0. 2007-05-31 Alex Graveley * compzilla/chrome/content/content.js: Add all the window types. * compzilla/chrome/content/atoms.js (Atoms): Make this awesome. 2007-05-31 Alex Graveley * compzilla/src/compzillaControl.cpp (Filter): Ignore CreateNotify, ConfigureRequest, and MapRequest events if the event's parent attr is not root. Rename minimize.js to minmax.js. 2007-05-31 Alex Graveley * compzilla/chrome/content/frame.js: Add _updateContentSize, which increments _ignoreConfigureCount, and calls _content.onmoveresize. In the configure event handler, ignore the event if _ignoreConfigureCount > 0, and decrement it. Call _updateContentSize at the end of show. * compzilla/chrome/content/minimize.js: Add a custom jQuery easing method that calls _focusedFrame._updateContentSize. Set animate to true, and use the custom animation. Call w._updateContentSize in the animation finished callback. * compzilla/chrome/content/content.js: Don't spew so much in onmoveresize. 2007-05-31 Alex Graveley * compzilla/chrome/skin/compzilla.css: Hide side/bottom frame borders for maximized windows. * compzilla/chrome/content/start.xul: Add uiDlgBorderLeft/Right helper classes to border divs, to simplify the css rules. 2007-05-30 Alex Graveley * compzilla/chrome/content/util.js: Use jQuery.extend here too. 2007-05-30 Chris Toshok * compzilla/chrome/content/start.js: initialize our workarea. * compzilla/chrome/content/minimize.js: reuse this file to hold RestoreCompzillaFrame and MaximizeCompzillaFrame. * compzilla/chrome/content/start.xul: use the maximize button as a toggle. Also set the initial window-state to normal. * compzilla/chrome/content/frame.js: implement state switching (maximize,minimize,fullscreen,normal) and restoring to normal from the others. also, realy fix that typo in parameter names to clientMessageRecv. * compzilla/chrome/content/workarea.js: make this so it doesn't crash on startup. 2007-05-30 Alex Graveley * compzilla/src/compzillaRenderingContext.cpp (Redraw): Fallback to 15.0 twips if nsPresContext::PixelsToTwips returns 0. I have no idea why this happens, but it does. 2007-05-30 Alex Graveley * compzilla/chrome/content/start.xul: Make cmd_minimizeWindow call _focusedFrame.minimize(). * compzilla/chrome/content/frame.js: Fix hide() by setting style.display="none". 2007-05-30 Chris Toshok * compzilla/chrome/content/overlay.js: use $(). * compzilla/chrome/content/debug.js: use $(). * compzilla/chrome/content/frame.js: use $() instead of both document.getElementById and getDescendentById. also, use jquery.Extend instead of the loop that adds methods. * compzilla/chrome/content/content.js: use $(), and jquery's clone method, and use jQuery.extend instead of the loop adding methods. Also remove the c&p extra field in _NET_WM_ICON_GEOMETRY's value. * compzilla/chrome/content/start.js: fix typo with DeleteRootWindowProperty method name, and use $(). * compzilla/chrome/content/frame.js: get rid of getElementById * compzilla/chrome/content/windowStack.js: change the sense of some if's so that we return in the then block. saves us indendation levels. also use $(). * compzilla/chrome/content/scale.js: call ondestroy instead of destroy. fixes js error. use $(). * compzilla/chrome/content/windowStack.js: constrain the _NET_SHOWING_DESKTOP property to 1 or 0, not whatever javascript maps true/false to. 2007-05-29 Chris Toshok * compzilla/chrome/content/windowStack.js: add back in the toggleDesktop method (it's used in start.xul), but have it just set/get showingDesktop. make the setter for showingDesktop update the root window property. use _addUtilMethods(windowStack) to get us windowStack.addProperty, to clean up the showingDesktop property. Also, make the moveToBottom code a little better - don't always restack. we don't start allocating Z indices from the bottom, but from 1/3rd of the way between bottom and top. so we can use the same maybeRestack logic in moveToBottom as moveToTop. * compzilla/chrome/content/workarea.js: track name change of SetRootWindowProperty. * compzilla/chrome/content/debug.js: fix the debug messages, and there's no reason to reassign windowStack here. it's already defined. * compzilla/chrome/content/content.js: track the name change of SetRootWindowProperty. * compzilla/chrome/content/start.js: fix typo in rootWindowClientMessageRecv parameter list (I can't believe JS doesn't error out about this...) set up the initial root window properties for many things. also, implement the _NET_SHOWING_DESKTOP client message handler. just set the windowStack.showingDesktop property. also, track the name change of SetRootWindowProperty. * compzilla/public/compzillaIControlObserver.idl: fix method name for client messages (add "Recv" to match the javascript.) * compzilla/src/compzillaControl.cpp: track rename of SetRootWindowArrayProperty, implement DeleteRootWindowProperty, and fix typo that was causing client messages to not work after the observer change. * compzilla/public/compzillaIControl.idl: add DeleteRootWindowProperty, rename SetRootWindowArrayProperty to SetRootWindowProperty (drop "Array"). 2007-05-29 Chris Toshok * compzilla/chrome/content/windowStack.js: fix up my half baked commit for the showingDesktop property. we should switch to that instead of toggleDesktop, so we can actually set it to a particular value instead of just toggling it. * compzilla/chrome/content/util.js, compzilla/chrome/content/frame.js, compzilla/chrome/content/content.js: actually what are we thinking? rename findPos to getPosition, and make it a UtilMethod that gets added to frame and content objects. Also, fix a js typo. I should test before i commit. 2007-05-29 Chris Toshok * compzilla/Makefile.am (content_DATA): add util.js. * compzilla/chrome/content/start.xul: load util.js. * compzilla/chrome/content/content.js: call _addUtilMethods on the new frame, and remove findPos. * compzilla/chrome/content/frame.js: call _addUtilMethods on the new frame. * compzilla/chrome/content/util.js: new file, generally useful stuff. put findPos here, and split out the addProperty methods from both frame.js and content.js, and add an _addUtilMethods function to add it. 2007-05-29 Chris Toshok * compzilla/src/compzillaControl.cpp: implement MapWindow and UnmapWindow. * compzilla/public/compzillaIControl.idl: add MapWindow and UnmapWindow. * compzilla/chrome/content/frame.js: add a minimize method to match maximize. make hide work the way mac osx's does. no animation, just hide the window. so now frame.minimize -> MinimizeCompzillaFrame -> frame.hide, no infinite recursion. * compzilla/chrome/content/content.js: call svc.UnmapWindow and svc.MapWindow in response to content.onhide and content.onshow, respectively. 2007-05-29 Chris Toshok * compzilla/chrome/content/frame.js: add override arg to map(). * compzilla/src/compzillaControl.cpp/.h: same. * compzilla/src/compzillaWindow.cpp/.h: same. * compzilla/public/compzillaIWindowObserver.idl: same. 2007-05-29 Chris Toshok * compzilla/Makefile.am (content_DATA): add workarea.js, and sort these. * compzilla/chrome/content/workarea.js: new file. * compzilla/chrome/content/windowStack.js: fix this to not use Atoms for wmWindowType anymore, and also remove the replaceWindow method, we don't need it/use it. * compzilla/chrome/content/frame.js: fix js error, and add some pseudo fleshed out maximize/strut handling. * compzilla/chrome/content/start.xul: just for kicks hook up maximize/minimize (change to the frame method here) and close. * compzilla/chrome/content/start.js: fix js error. 2007-05-29 Alex Graveley * compzilla/src/compzillaControl.cpp/h: Don't implement nsIDOMEventTarget, and replace all DOM event code with calls on each registered observer. Implement add/removeObserver by adding observers to an nsCOMArray. * compzilla/src/compzillaWindow.cpp/h: Also call DestroyWindow in destructor if !mIsDestroyed. Return NS_OK from KeyPress, instead of NOT_IMPLEMENTED. Clear content nodes and observers in DestroyWindow. * compzilla/src/compzillaModule.cpp: Don't expose compzillaIWindowEvents. * compzilla/public/compzillaIWindow.idl: New methods: addObserver, removeObserver. * compzilla/public/compzillaIControl.idl: Ditto. * compzilla/chrome/content/start.js: Call svx.addObserver. * compzilla/chrome/content/frame.js: Use nativewin.addObserver instead of conntecting to nativewin events, and stick the observer in frame._observer. Add "visible" property to frame, setting it calls show/hide. 2007-05-29 Alex Graveley * compzilla/public/compzillaIWindowObserver.idl: * compzilla/public/compzillaIControlObserver.idl: New ifaces for observer-based eventing. * compzilla/public/compzillaIWindowManager.idl: Kill this. 2007-05-29 Alex Graveley * compzilla/chrome/content/start.xul: Include jquery.easing.1.1.js and jquery.1.1.2.js. Switch desktop to use phase="capturing". * compzilla/chrome/content/jquery.easing.1.1.js: Add this jquery plugin for nice animation effects. * compzilla/chrome/content/jquery.1.1.2.js: Replace jquery.pack.js with this unpacked latest version. We don't need to worry about transfer times, so readability is good here. * compzilla/chrome/content/minimize.js: Use screen.height for fallback coords, since windowStack.ofsetHeight can be outside the visible screen. Use the "easeout" animation from the jquery.easing plugin. Set the duration to 1 second so you can see it happen. * compzilla/chrome/content/scale.js: Use screen.width/height here for the same reason. * compzilla/chrome/skin/compzilla.css: Don't change the cursor by default for .uiDlgButton, only when it is visible. 2007-05-29 Chris Toshok * compzilla/chrome/content/atoms.js (Atoms): add the MOVERESIZE_CANCEL operation, and add the _NET_WM_STATE change operation constants. * compzilla/chrome/content/frame.js: add some comments about in the client message event handler for the different applicable message types. * compzilla/chrome/content/start.js: same. 2007-05-27 Chris Toshok * compzilla/src/compzillaControl.cpp, compzilla/src/compzillaControl.h: add root level client message event manager, or call into compzillaWindow when there's a relevant window. * compzilla/src/compzillaWindow.cpp, compzilla/src/compzillaWindow.h: add client message event manager and code to emit the event. * compzilla/src/compzillaWindowEvents.cpp, compzilla/src/compzillaWindowEvents.h: add the client message event subclass, and split this code up to use subclasses of compzillaWindowEvent. * compzilla/public/compzillaIWindowEvents.idl: add compzillaIWindowClientMessageEvent. I don't like the d[1-5] data fields, but I hate the xpidl array stuff even more. * compzilla/chrome/content/start.js: add root window clientmessage handler, and actually advertise some EWMH features as supported. * compzilla/chrome/content/frame.js: add code to call content.ongotfocus and onlostfocus. Add the allow-close mapping so frame.allowClose works. last, add stub for the clientmessage event, so we can start filling in EWMH handlers. * compzilla/chrome/content/debug.js: this window can't be minimized/maximized/closed (at least not in the normal sense. maybe we should hook up close to toggleDebug or something.) * compzilla/chrome/content/content.js: add ongotfocus and onlostfocus handlers that update _NET_ACTIVE_WINDOW on the root window. * compzilla/chrome/content/atoms.js: add some more EWMH atoms. 2007-05-27 Alex Graveley * compzilla/chrome/content/debug.js: Comment out keypress handler. * compzilla/chrome/content/minimize.js: Ditto. * compzilla/chrome/content/overlay.js: Ditto. * compzilla/chrome/content/scale.js: Ditto. Add toggleScale, callable from a command handler. * compzilla/chrome/content/start.xul: Hookup command handlers for minimize, overlay, desktop, scale, and debug toggling. 2007-05-27 Alex Graveley * compzilla/chrome/content/start.xul: Make commands work on frame images. These just show an alert for now. 2007-05-26 Alex Graveley * compzilla/chrome/content/frame.js: Call windowStack.moveToTop on map. * compzilla/chrome/content/minimize.js: Use w.content.XProps. * compzilla/chrome/content/content.js: Add Atoms._NET_WM_ICON_GEOMETRY to XProps. 2007-05-25 Alex Graveley Make resizing the X window via the frame work... * compzilla/src/compzillaWindow.cpp (WindowConfigured): Take an isNotify arg. Only send the configure DOM event when not a notify, or if it's an override window. Only reset the pixmap if it is a notify, and the sizes have changed. Don't call UpdateAttributes, but just update mAttr directly, and only if it's a notify. * compzilla/src/compzillaControl.cpp (Filter): Pass false for isNotify to WindowConfigured for ConfigureRequest events. Pass true for ConfigureRequest. * compzilla/chrome/content/frame.js: (configure handler): call frame.moveResizeToContent, instead of moveResize to attempt to move the frame to the correct location relative to the window. (frameDragMouseMoveListener): switch on operation without the "-resize" appended, this was dumb. * compzilla/chrome/content/start.js: Ditto, but it's broken for the initial case for some reason, the frame still offsets the window. 2007-05-24 Chris Toshok * compzilla/chrome/content/frame.js, compzilla/chrome/content/content.js: incomplete but functional first pass at moving all the nativeWindow stuff into content.js from frame.js. the big holdouts left are _connectNativeWindowListeners and some initialization stuff in CompzillaFrame (). content objects now have the following methods they can implement: ondestroy, onmoveresize, onhide, onshow, onmaximize, onfullscreen. These get called when the relevant frame method is called. 2007-05-24 Chris Toshok * compzilla/src/compzillaWindow.cpp (GetCardinalListProperty): useful function for dealing with properties that are n-Cardinals, like STRUT/STRUT_PARTIAL/ICON_GEOMETRY). (GetProperty): make use of GetCardinalListProperty, and implement the STRUT stuff. * compzilla/src/compzillaWindow.h (class compzillaWindow ): prototype for GetCardinalListProperty. * compzilla/chrome/content/start.xul: add xprops.js * compzilla/chrome/content/frame.js: quite a few changes: - remove the addCachedEventListener stuff and just use addEventListener. we only needed to worry about the cached event listeners when we were reparenting the content between dock/frame nodes. - add a convenience method (mapPropertyToPyroAttribute) to collapse the trivial object property <-> element attribute mapping some of the properties had. - reorder the addProperty calls in addFrameMethods to group them a bit more logically (map directly to attribute, more computational elements, and X properties). - lastly, seriously clean up the X property stuff by creating a separate (caching, but trivial to disable that) object. This has the side effect of removing duplicate and/or error prone code from all the various property getters for X properties. things look a lot cleaner now. - start in on support for _NET_WM_STRUTS[_PARTIAL] * compzilla/chrome/content/xprops.js: the aforementioned separate object for dealing with X properties, mapping them to JS objects, and caching. * compzilla/Makefile.am (content_DATA): add xprops.js 2007-05-24 Alex Graveley * compzilla/chrome/content/frame.js: (frameDragMouseMoveListener): Only set frame.moving once we have a move delta, to avoid flickering the opactiy. 2007-05-24 Alex Graveley Fix the Js/CSS side of move/resize... * compzilla/chrome/skin/compzilla.css: (#debugContent) Make the debug controls 4em large and no-wrap and hidden overflow. (#contentLog): Set the to top:0px and bottom:4em. (.uiDlgContent): Make this absolute, top:30px, bottom:8px, so we can make the content fill it. (.uiDlgContentCenter): Make this absolute too, so we can fill all the parent space. (.uiDlgBottom): Absolute, at the bottom. * compzilla/chrome/content/frame.js (moveResize): Only call _configureNativeWindow if _moveResize returns true. (_moveResize): Return true if something changed. Keep this simple, only setting the frame extents, and updating the _content height/width from it's offsetHeight/Width. (frameDragMouseMoveListener): Just read the frame's offsets, the CSS will figure the rest out. (propertychange): Switch on atom, instead of ifs. * compzilla/chrome/content/start.js: Quick workaround for initial resizing to adjust for frame border size. * compzilla/chrome/content/start.xul: Add debug controls in debugActions div, so we can style it. * compzilla/chrome/content/windowStack.js: Use var for layer. 2007-05-23 Chris Toshok * compzilla/chrome/content/frame.js (frameDragMouseMoveListener): exit out early if dx and dy are 0, which they seem to be on mouse clicks without drag in the title bar. 2007-05-23 Chris Toshok [ This gets window titles working for both JS and native windows ] * compzilla/chrome/content/frame.js (everywhere): use XA_ properties where possible. (chromeless property): use the jquery addClass/removeClass/is methods for this, to clean it up a bit. (wmName property): flatten the if/else structure a bit. (title setter): we need to update both the pyro-namespaced caption attribute on the div as well as the contents of the windowTitleSpan. * compzilla/chrome/skin/compzilla.css: make the title caption a pyro namespaced attribute. * compzilla/chrome/content/atoms.js: add all the XA_* atoms. instead of relying on _intern for them. * compzilla/chrome/content/start.xul: set a class on the span in the title so we can update its content properly. 2007-05-23 Chris Toshok * compzilla/src/XAtoms.h: add UTF8_STRING. * compzilla/src/compzillaWindow.cpp (GetStringProperty): fix this so it handles by XA_STRING and UTF8_STRING properties, and use the gdk method to convert from an encoded X property to utf8, which we then convert to UTF16. 2007-05-23 Chris Toshok [ pretty huge commit ] * compzilla/public/compzillaIWindowEvents.idl: remove the property bag. * compzilla/src/compzillaWindowEvents.cpp/.h: remove the property bag. * compzilla/src/compzillaWindow.cpp (GetStringProperty): since this isn't part of the idl anymore, clean it up by taking an Atom parameter, and removing a cast. (GetProperty): massaged this method from the guts of PropertyChanged. there's certainly more refcounting problems here... we also create instances only to let them die if the property isn't found. This method returns NULL for bag2 if the property isn't set. Also, provide an implementation for _NET_WM_ICON_GEOMETRY. (PropertyChanged): remove the window parameter. we should just be using mWindow anyway. no longer do anything with the property bag here. if the JS wants it they can turn around and query the native code for it. * compzilla/src/compzillaControl.cpp (SetRootWindowArrayProperty): new method, just a thin wrapper around XChangeProperty on the root window. (PropertyChanged): there's no need to pass the window ID to compwin->PropertyChanged. * compzilla/public/compzillaIWindow.idl: remove GetAtomProperty and GetStringProperty, replacing them with GetProperty, which returns an nsIPropertyBag2. * compzilla/public/compzillaIControl.idl: add SetRootWindowArrayProperty. * compzilla/chrome/skin/compzilla.css: set uiDlg's overflow to hidden, so that we never see the window content outside the frames, even if we happen to be resizing and that causes the frame to resize before the content element. Also, comment out the uiDlgButton's float style, as it seems to work fine for me without it, and it removes gobs and gobs and gobs of mozilla assertions. That float is incorrect given the surrounding context. * compzilla/chrome/content/start.js: hack to get the task switcher to work. update the _NET_CLIENT_LIST and _NET_CLIENT_LIST_STACKING to the same array, the entire list of windows we manage. * compzilla/chrome/content/scale.js: make the destination of the animation in the scale-in case (when we're going back to a normal desktop) line up with the original window contents, instead of the frame positions. Also, switch from "windowFrame" to "uiDlg" (worst. class name. ever.) * compzilla/chrome/content/minimize.js: if the window has a _NET_WM_ICON_GEOMETRY property, do the minimize animation to that rectangle. makes us look all snazzy when running against gnome-panel. * compzilla/chrome/content/frame.js: lots of changes. 1. _moveResize: calculate the new content width/height based on the old width/height and the delta of new_frame_size - old_frame_size. 2. fix frame.title setter. 3. add a wmName property that gets _NET_WM_NAME, falling back to WM_NAME. 4. remove the try/catch from the wmWindowType getter. 5. In CompzillaFrame initialize the frame's title to the frame's wmName property. 6. frameDragMouseMoveListener: break out "move" from "resize", as it's simpler and this way and before it confused the purpose of the two switches. Also, don't update the frame's styles directly here. just store the values in variables and call frame.moveResize calculating them all. 7. no need to check if we're moving, just always set moving to false. And don't generate another configure event on mouseup. This was causing configure events to be generated when we clicked on a titlebar, which is clearly wrong. 8. frame.onmousedown: go ahead and store off the frameDragPosition regardless of whether we're going to end up performing an operation. We'll need this for more programmatic operations anyway (alt-mouseclick to move, etc) 9. configure native listener: use a similar calculation method for determining the new frame width. we know both the before/after content width's/height's, so use that delta and add it to the frame width/height. 10. property change native listener: if the WM_NAME/_NET_WM_NAME changes, invalidate our cached value and refetch it. don't use the property bag her anymore. it's gone. * compzilla/chrome/content/debug.js (debugToggle): new function, used as a callback from onclick handlers in the html. * compzilla/chrome/content/atoms.js (Atoms): add a ton of _NET_WM atoms, and make everything getters instead of functions. all references to Atoms.Foo() are replaced with Atoms.Foo elsewhere. 2007-05-22 Alex Graveley Flush themed window frame code, with resize and property fixups. Sizing/configure is broken, but this change is already too big. 2007-05-22 Chris Toshok * compzilla/chrome/content/scale.js: use a constant for the timeout, and use * instead of / for the width and height. 2007-05-22 Chris Toshok * compzilla/Makefile.am (content_DATA): add jquery .js file. * compzilla/chrome/content/start.xul: load the jquery js file. * compzilla/chrome/content/start.js: remove that stupid hack for gnome-terminal wm-class. * compzilla/chrome/content/scale.js: use jquery for extreme beauty. * compzilla/chrome/content/minimize.js: use jquery for extreme beauty. 2007-05-22 Chris Toshok * compzilla/Makefile.am (content_DATA): install minimize.js. * compzilla/chrome/content/start.xul: load minimize.js. * compzilla/chrome/content/minimize.js: temporary hack. we should either port compiz's or come up with the proper math for a smooth animation ourselves. 2007-05-22 Chris Toshok * compzilla/chrome/content/scale.js: so the reason this doesn't work is that the compzillaWindowContent stuff isn't absolutely positioned anymore. force sw.style.position="absolute", and everything is happy. also, remove all the debug spew. 2007-05-21 Chris Toshok * compzilla/chrome/skin/compzilla.css: add the opacity stuff for moving windows, and the focused title background color changing here. * compzilla/chrome/content/scale.js: work on this some more. we now create another content node for the windows (which gets drawn properly), and we move that. presently completely screwed for some reason, but at least we have live updating content in the scaled windows. * compzilla/src/compzillaWindow.cpp (AddContentNode): if we add a content node and we have a backing store, we need to explicitly draw that node. (RedrawContentNode): new method, split out the contents of the loop from WindowDamaged. (WindowDamaged): loop over the content nodes, calling RedrawContentNode. * compzilla/src/compzillaWindow.h (class compzillaWindow ): add RedrawContentNode method to explicity draw just one of our nodes. * compzilla/chrome/content/windowStack.js: use the property getters and log levels. * compzilla/chrome/content/start.js: use the property setter. * compzilla/chrome/content/frame.js: yay property getters/setters. and log levels. and window-state for "focused". also, get rid of the window moving opacity hack. it's done via css now. * compzilla/chrome/content/content.js: yay property getters/setters. and log levels. * compzilla/chrome/content/debug.js (Debug): make Debug take 2 args, a log name and a debug string. if we pass 1 string it assumes "all" for the log name. Add two methods (debugSelectLog and debugDeselectLog) to control which logs are shown. 2007-05-21 Alex Graveley * compzilla/src/compzillaWindow.cpp (ConnectListeners): Use NS_LITERAL_STRING to create the list of event names to connect to statically. 2007-05-17 Alex Graveley * compzilla/src/compzillaWindow.cpp (GetStringProperty): Handle prop lookup failure. (GetAtomProperty): Ditto. (PropertyChanged): Use CallCreateInstance to create the property bag. This is what other moz code does. * compzilla/src/compzillaRenderingContext.cpp (Redraw): Switch to non-syncronous draws, since there's a performance improvement when multiple windows are updating. * compzilla/src/compzillaControl.cpp: Add WindowConfigured helper. Avoid calling methods on already-destroyed windows. * compzilla/chrome/skin/compzilla.css: Hide #windowTitleBox for windowFrames of class dockFrame. * compzilla/chrome/content/start.xul: Remove dockFrame: we just set the class on windowFrame items. * compzilla/chrome/content/start.js: Use CompzillaMakeFrame. * compzilla/chrome/content/frame.js: Add CompzillaMakeFrame, which creates a frame as determined by _determineFrameClassName. Make CompzillaFrame take a className to use. Kill _copyPyroFrameAttributes since we don't create multiple frames for the same content anymore. Use _determineFrameClassName when the window type changes. * compzilla/chrome/content/debug.js: Pass "windowFrame" as the className for debugFrame. * compzilla/chrome/content/content.js: null out the _nativewin ref on destroy. 2007-05-16 Alex Graveley * compzilla/chrome/skin/compzilla.css: Add a #windowContent:focus class to set the outline-width to 0; * compzilla/chrome/content/start.xul: Set tabindex here, instead of in content.js, and remove mousethrough while we're here. 2007-05-16 Alex Graveley * compzilla/chrome/content/frame.js: In the frame mousedown handler, call _content.focus() to give keyboard focus to the content, and send a FocusIn behind the scenes. Also call _content.blur() on previously focused content to send FocusOut. * compzilla/chrome/content/content.js: Set tabIndex="1" so the content can be focused. 2007-05-16 Alex Graveley * compzilla/defaults/preferences/prefs.js: Set browser.sessionstore.resume_from_crash to false, to maintain sanity. 2007-05-16 Alex Graveley * compzilla/chrome/content/overlay.js: New file. Just toggles the overlayLayer visibility when pressing Alt-F9. Loads it with http://www.google.com/ig (Google Homepage). * compzilla/chrome/content/start.xul: Put an iframe in overlayLayer. * compzilla/src/compzillaControl.cpp (InitWindowState): Reenable adding existing windows at startup. 2007-05-16 Alex Graveley * compzilla/chrome/content/frame.js (svc): Call ConfigureWindow in response to the configure event, if the window isn't override_redirect. This fixes xterm. * compzilla/src/compzillaWindow.cpp (MapWindow): Avoid a terver roundtrip by just setting mAttr.map_state. (UnmapWindow): Ditto. (WindowConfigured): Always call ResetPixmap. * compzilla/src/compzillaControl.cpp (Filter): Call ConfigureWindow for windows which don't have a compzillaWindow. * compzilla/public/compzillaIControl.idl: Add bool overrideRedirect arg to SendConfigureNotify. 2007-05-15 Chris Toshok * compzilla/Makefile.am (component_DATA): remove compzillaWindowManager.js from the list of files to install. * compzilla/chrome/content/frame.js (frame.destroy): if the destroyed frame was the one that was focused, clear the ref so it can be collected. * compzilla/src/compzillaControl.h (class compzillaControl): update signature for FindWindow and GetNativeWidget. Also, make mWindowMap an nsRefPtrHashtable instead of an nsClassHashtable. * compzilla/src/compzillaControl.cpp (AddWindow): use nsRefPtr instead of a raw pointer for both the window and event. (DestroyWindow): same. (GetNativeWidget): change this around to using an out parameter to get ref counting right. (GetNativeWindow): update to track GetNativeWidget. (Filter): same, and use nsRefPtr. (FindWindow): mark the return value already_AddRefed. * compzilla/src/compzillaWindowEvents.cpp (CZ_NewCompzillaWindowEvent): spew the new event pointer. (CZ_NewCompzillaPropertyChangeEvent): same. (CZ_NewCompzillaConfigureEvent): same. (~compzillaWindowEvent): spew which event we're destroying. (compzillaWindowEvent): addref the property bag we pass in. this fixes the crash with gnome-terminal. I'd like to believe the nsCOMPtr machinery would do this for us, but it doesn't appear to. * compzilla/src/compzillaWindowEvents.h: make all the dtors virtual. * compzilla/src/compzillaWindow.cpp (~compzillaWindow): add alex's change to disconnect all content node listeners. (DestroyWindow): set mDamage to 0 here. use nsRefPtr and getter_AddRefs. instead of a pointer which we'll need to release. (MapWindow): same. (PropertyChanged): same. (UnmapWindow): same. (WindowConfigured): same. * compzilla/src/XAtoms.h: add _MOTIF_WM_HINTS in preparation for supporting them. 2007-05-15 Chris Toshok * compzilla/chrome/content/atoms.js (Atoms): add _NET_WM_WINDOW_TYPE_TOOLBAR/NORMAL. * compzilla/chrome/content/frame.js: _compzillaFrameCommon is starting to get pretty confusing, with the actual code we're executing as well as the methods we're adding. split the methods out into a separate object. Also, add some code to follow metacity's method for setting allowed actions based on window type. 2007-05-15 Chris Toshok * compzilla/chrome/content/content.js: make "content" a local variable here, or else we're using a global and trashing over previous CompzillaWindowContent calls. 2007-05-14 Chris Toshok * compzilla/chrome/content/start.js: initialize the allowed-actions on the frame to "minimize maximize close", and as a temporary hack, explicitly set its wm-class so that we can see if that works. * compzilla/chrome/skin/compzilla.css: add the pyro (and xul, for completeness' sake). Also add some example attribute selectors which only show the window manager buttons (close, minimize, maximize) when the allowed-actions attribute contains the proper value. Add an example of using the wm-class attribute for styling, although it doesn't work without the hack that I stuck in start.js. * compzilla/chrome/content/atoms.js (Atoms): add WM_CLASS and WM_TRANSIENT_FOR. * compzilla/chrome/content/start.xul: add the pyro xml namespace. * compzilla/chrome/content/frame.js: add {get,set}WMClass and {get,set}AllowedActions which provide for a means of styling windows based on their X window manager class, as well as a way for showing/hiding window manager functionality. 2007-05-14 Alex Graveley * compzilla/chrome/content/windowStack.js (debugLayer): Change to using named properties (minZIndex, maxZIndex, and highZIndex) on layer Objects. Add windowStack.addLayer, and windowStack.getLayer. * compzilla/src/compzillaWindow.cpp (MapWindow): Use UpdateAttributes and EnsureDamage helpers, and call them before sending the "map" event. (~compzillaWindow): Avoid the error spew on window destroy by setting mIsDestroyed, and only resetting things in the destructor if this is not true. Always call ResetPixmap though. (compzillaWindow): Don't call EnsurePixmap here, call UpdateAttributes. * compzilla/src/compzillaControl.cpp (AddWindow): Call CZ_NewCompzillaConfigureEvent instead of new. (DestroyWindow): Ditto, except with CZ_NewCompzillaWindowEvent. Don't poke at window's mDamage. 2007-05-14 Chris Toshok * compzilla/Makefile.am (skin_DATA): add the desktop-background.jpg back in, so we get a sweet, sweet background. * compzilla/src/compzillaWindow.h: add ResetPixmap. * compzilla/src/compzillaWindow.cpp (ResetPixmap): free/reset mPixmap. (EnsurePixmap): don't do XGetWindowAttributes here. (GetStringProperty): don't leak property data. (GetAtomProperty): same. (DestroyWindow): use CZ_NewCompzillaWindowEvent. (MapWindow): use CZ_NewCompzillaWindowEvent. do XGetWindowAttributes here to get the initial width/height on map, and create mDamage here if it hasn't already been created. (PropertyChanged): use CZ_NewPropertyChangeEvent. add a "break" after XA_WM_NORMAL_HINTS so we don't fall through. Handle XA_WM_CLASS. (WindowConfigured): rework this a little. use CZ_NewConfigureEvent. resync our idea of the current window attributes (server round trip, ugh) and reset the pixmap *after* the js has had time to deal with the event (since it might give the client a different size). * compzilla/src/compzillaWindowEvents.cpp (CZ_NewCompzillaWindowEvent) (CZ_NewCompzillaPropertyChangeEvent) (CZ_NewCompzillaConfigureEvent): new methods to create compzillaWindowEvents and provide them with an initial ref. * compzilla/src/compzillaWindowEvents.h: add prototypes for the new CZ_* calls. * compzilla/src/compzillaControl.cpp (Filter): for the time being handle ConfigureNotify by just calling WindowConfigured, but only for override redirect windows (since we don't get ConfigureRequest). (AddWindow): Don't call window->EnsurePixmap here, we do it lazily. 2007-05-11 Alex Graveley * compzilla/chrome/skin/compzilla.css: Clean out some old cruft. Fix strange desktop positioning in FF2 by making the body tag position:absolute. Remove unnessasary position:static. * compzilla/chrome/content/start2.xul: Make the debugLog a textarea. 2007-05-10 Chris Toshok * compzilla/chrome/skin/compzilla.css: add some style rules for focused windows. change the titlebar background in the focused window. * compzilla/chrome/content/frame.js (svc): just fucking around. keep track of the "focused" window and change its CSS class to className + "Focused". 2007-05-10 Chris Toshok * compzilla/src/compzillaWindowEvents.cpp (GetBorderWidth): return the border width, not the width. * compzilla/chrome/skin/compzilla.css: visibility -> display here too. * compzilla/chrome/content/debug.js: oops, toggleDebugWindow -> debugToggleWindow. * compzilla/chrome/content/frame.js: switch to using display instead of visibility to show/hide windows. saves us having to set visibility on both the content and frame. also, clean up the frame recreation in the WINDOW_TYPE code. * compzilla/chrome/content/windowStack.js: make replaceWindow a no-op if w1 == w2. 2007-05-10 Chris Toshok * compzilla/chrome/content/frame.js: add a new function, addCachedEventListener (this should really be a method added to nativewin) which does the idempotent "if registered, unregister then register" thing. This is so we can just call CompzillaFrame or CompzillaDockFrame multiple times on the same content element (which we need to be able to do to support WINDOW_TYPE property changes) and have it not keep adding event handlers. Make use of this method in _connectNativeWindowListeners. Also, port the wm.js propertychange support for _NET_WM_WINDOW_TYPE over. This makes panels come up with the the window manager frame (nautilus desktop windows too). Also, only resize the titlebox if there is one. fixes js errors on resizing dock frames. * compzilla/chrome/skin/compzilla.css: make the debug window a little prettier (smaller font), and fix up the titlebar font a bit as well. also, track class changes in start2.xul. * compzilla/chrome/content/start2.xul: add some class's for things which make sense (the dock frame, since in both windowFrame and dockFrame we expect the user to change the id), and to the windowTitle. * compzilla/chrome/content/windowStack.js (stackWindow): use w.id instead of w.getTitle() since it might not be set by the time the window is added to the stack (and will almost never be set if the window is an override window). * compzilla/chrome/content/start2.js: set the frame's id to "XID:" + native x id. * compzilla/chrome/content/debug.js: since it's a singleton, let's set the frame's id. also, just always show the frame's id in debugListWindows. this gets us the XID in the X case, and whatever the user specifies in the non-X case. 2007-05-10 Chris Toshok * compzilla/src/compzillaWindow.cpp: rename the events we raise to be more indicative of the X event. show => map, hide => unmap, moveresize => configure. there's no reason to add confusion by inventing another name. seeing those strings in the js makes it a little more clear you're dealing with X-land as opposed to dom-land, too. * compzilla/chrome/content/frame.js: send synthetic and real ConfigureNotify events at the appropriate times. X windows now move to match their content elements again. Resize the window title box width-wise along with the content box. this makes the window titlebars look right(er). Also, track the change in event names on compzillaWindow. lastly, reorder the args for moveResize to be x,y,w,h. it's moveResize, not resizeMove. * compzilla/chrome/content/start2.js: track moveResize arg change. * compzilla/chrome/content/debug.js: track moveResize arg change. Use display = "none"/"block" instead of visibility in debugToggleWindow, and add a hacky Ctrl-F10 keypress to the document to toggle the debug window. This should arguably be a command on the document. * compzilla/chrome/content/start2.xul: use an hbox instead of a div for the titlebox. this + the width setting on resize in frame.js makes the button layout a little more sane. 2007-05-10 Alex Graveley * compzilla/chrome/content/windowStack.js: Fix click to raise for FF2 by making moveToTop a noop if the window is already on top. 2007-05-10 Alex Graveley * compzilla/chrome/skin/compzilla.css: Hide some layers by default, clean up a bit. * compzilla/chrome/content/debug.js (debugListWindows): Print the XID and frame rect. * compzilla/public/compzillaIWindow.idl: Add nativeWindowId accessor. 2007-05-09 Chris Toshok * compzilla/Makefile.am: I am an idiot. fix the rules the right way. 2007-05-09 Chris Toshok * compzilla/src/compzillaControl.cpp (AddWindow): use CZ_NewCompzillaWindow and NS_RELEASE (when needed). This fixes the random crashes after a JS GC I've been seeing. 2007-05-09 Chris Toshok * compzilla/src/compzillaWindowEvents.cpp: we need to include nsMemory.h here to fix compilation errors. 2007-05-09 Chris Toshok * compzilla/src/compzillaWindow.h: add prototype for CZ_NewCompzillaWindow. * compzilla/src/compzillaWindow.cpp: #include nsMemory or else we get undefined nsMemory::Clone symbols in trunk mozilla. add NS_IMPL_CI_INTERFACE_GETTER for compzillaWindow to fix undefined symbols when we run. add CZ_NewCompzillaWindow function to be used instead of "new compzillaWindow". (EnsurePixmap): spew an error if we fail to get the backing pixmap for a window. (PropertyChanged): XGetWMHints can return NULL. (WindowConfigured): if the window is resized the backing pixmap becomes invalid. make sure we free our old one and set mPixmap to null so we'll refetch it the next time EnsurePixmap is called. 2007-05-09 Chris Toshok * compzilla/Makefile.am: add compzilla script installation to bindir, and quiet down automake 1.10 (it complains about gmake specific rules.) * configure.in: add compzilla script generation. * compzilla/compzilla.in: new conveience script which runs the firefox binary with our chrome. 2007-05-08 Alex Graveley * compzilla/src/compzillaModule.cpp: Expose compzillaWindow and compzillaWindowEvent to JS by calling NS_DECL_CLASSINFO. * compzilla/src/compzillaWindowEvents.cpp: Make compzillaWindowEvents implement nsIDOMEvent, since the call NS_NewDOMEvent used by mozilla-internal event creators is not exposed. Expose classinfo so JS can access members easily. * chrome/content/start2.js/xul: Add these xul document alternative versions of start.xul/js 2007-05-08 Chris Toshok * compzilla/chrome/content/windowStack.js: soptimize toggleDesktop, and add some XXX comments. 2007-05-08 Chris Toshok * compzilla/Makefile.am (content_DATA): add atoms.js and windowStack.js 2007-05-08 Chris Toshok * compzilla/chrome/content/atoms.js: new file, split out the atoms stuff from compzillaWindowManager.js here, and dangle the object off the desktop element so different scripts can gain access to it. * compzilla/chrome/content/windowStack.js: reindent this - my modeline was ignored. 2007-05-08 Chris Toshok * compzilla/chrome/content/windowStack.js: document this a little bit, fix up some incorrect args to stackWindow, and only dangle off the windowStack element those methods which are public. Private ones are defined in the local file scope. 2007-05-08 Chris Toshok * compzilla/chrome/content/windowStack.js: first pass at the new windowstack code. I've split it out from compzillaWindowManager.js but it can't be used until we get the mousethrough behavior fixed in mozilla. 2007-05-06 Alex Graveley * compzilla/src/compzillaWindowEvents.cpp (Send): New, renamed from compzillaWindow::SendWindowEvent. * compzilla/src/compzillaControl.cpp: Call compzillaWindowEvents::Send instead of SendWindowEvent. (Filter): Pass deleted to PropertyChanged. (AddWindow): Send "windowCreate" and "windowDestroy" events. 2007-05-01 Chris Toshok * compzilla/chrome/content/scale.js: resize the test area from 800x600 to 1024x768. fix a typo that was causing all scales (except for the first window) to be 1.0, causing bizarre shrinkage problems. add the fourth test div. 2007-05-01 Alex Graveley * compzilla/src/compzillaWindowEvents.cpp: Add compzillaWindowEvent, a single impl of all the new window event ifaces. Use the NS_FORWARD_NSIDOMEVENT macro to forward to an inner nsIDOMEvent. * compzilla/public/compzillaIWindowEvents.idl: Add compzillaIWindowEvent, compzillaIWindowConfigureEvent, compzillaIWindowPropertyEvent interfaces passed to compzillaIWindow event listeners. * compzilla/src/compzillaWindow.cpp (DestroyWindow): Emit "destroy" events. (MapWindow): Emit "show" events. (UnmapWindow): Emit "hide" events. (PropertyChanged): Emit "propertyChange" events. Use SET_PROP macro to make this a bit less verbose. (WindowConfigured): Emit "moveResize" without coord data yet. (SendWindowEvent): Aggregates a compzillaWindowEvent with a newly created nsIDOMEvent and calls NotifyEventListeners with it. * compzilla/src/compzillaEventManager.cpp: Add HasEventListeners. 2007-04-25 Alex Graveley * compzilla/src/compzillaControl.cpp (AddWindow): No need to cast to compzillaIWindow before passing to WindowCreated. * compzilla/src/compzillaEventManager.cpp: nsDOMJSUtils.h doesn't exist in mozilla1.8. * compzilla/src/compzillaWindow.cpp (WindowDamaged): Don't crash if a content node isn't a nsIDOMHTMLCanvasElement. 2007-04-24 Chris Toshok * compzilla/src/compzillaWindow.cpp: add the methods from compzillaControl here, and also extend this class to allow multiple content nodes. * compzilla/src/compzillaControl.h: move the atoms stuff out of here. * compzilla/src/compzillaControl.cpp: move many of the methods from here to compzillaWindow (everything that did a FindWin followed by an operation, basically, like UnmapWindow, MapWindow, WindowDestroyed, etc). * compzilla/public/compzillaIWindowManager.idl: add the compzillaIWindow parameter to WindowCreated, and remove the return type. * compzilla/public/compzillaIWindow.idl: add Get{String,Atom}Property methods. * compzilla/public/compzillaIControl.idl: we don't need Get{String,Atom}Property anymore. they're in compzillaIWindow.idl * compzilla/components/compzillaWindowManager.js (WindowCreated): call compzillaIWindow.AddContentNodehere instead of returning the canvas element. * compzilla/Makefile.am (libcompzilla_la_SOURCES): add XAtoms.h * compzilla/src/XAtoms.h: new file. check out that awesome union, yo. 2007-04-23 Chris Toshok * compzilla/Makefile.am (IDL_FILES): add compzillaIWindow.idl * compzilla/public/compzillaIWindow.idl: new interface. 2007-04-23 Chris Toshok * compzilla/components/compzillaWindowManager.js: rework the property change stuff to take the property. * compzilla/src/compzillaControl.cpp: put the window property stuff here for now. Use a property bag to communicate arguments to the js. 2007-04-23 Alex Graveley * compzilla/src/compzillaControl.cpp (AddEventListener, RemoveEventListener): Impl nsIDOMEventTarget, farming out to mWindowCreateEvMgr for "windowcreate" event. * compzilla/src/compzillaWindow.cpp (AddEventListener) (RemoveEventListener): Ditto, but with "destroy", "moveresize", "show", "hide", and "propertychange" events. * compzilla/src/compzillaEventManager.h: New class to hold a list of nsIDOMEventListeners, and wrap all guts of nsIDOMEventTarget. 2007-04-21 Chris Toshok * compzilla/chrome/skin/compzilla.css: debug style changes (since we now have debugContent and debugLog). Also, add the override_content class style. * compzilla/components/compzillaWindowManager.js: comment out some of the debug spew that was causing some operations to slow wayyy down. deal with the override_redirect window styling in a more css compliant way by setting override redirect content's CSS class to "override_content" instead of "content". Move the opacity assignment to the stylesheet. Fix the weird windows showing up at startup (and when you opened certain applications like gedit or gnome-terminal.). Turns out that we have to set the visibility on both the canvas and the wm frame to "hidden" for unmapped windows, or else the contents is displayed. we were just hidding the wm frame. firefox bug? factor out the creation of the debug window, and add a "Clear" button, which is horribly placed to be mostly obscured by the debug log. Not sure why, but clicking on the part that *is* visible clears the log. 2007-04-20 Chris Toshok * compzilla/src/compzillaControl.cpp (SendConfigureNotify): spew out the configure info. (Filter): print out the border_width of the request here too. * compzilla/components/compzillaWindowManager.js: (WindowConfigured): remove the addition to width/height here. With it, gnome-terminal goes into an infinite loop requesting a new size, growing all the time. heh. 2007-04-20 Chris Toshok * compzilla/components/compzillaWindowManager.js (WindowCreated): try to make sure the window is placed on screen, and deal with windows which are already mapped when we find out about them. (WindowConfigured): for the time being this is only ever called from the ConfigureRequest handler, so we don't need to worry about all the variety of cases metacity deals with in its horribly overloaded window resize code. Also, at the moment we honor all requests, regardless of screen/window size. So you can move windows completely off the screen, resize them larger than the screen, etc. Since we're not changing the configure information, we follow the ICCCM and send a synthetic ConfigureNotify back to the client. (DocumentMouseMove): since so many resize handles result in both the window moving and resizing, make 1 call that does both (so we can make 1 XConfigureWindow call in the native code instead of 2.) (CreateWMChrome): clean this up a touch. we don't need to both removeChild/appendChild to reparent a dom element, appendChild does both. (MoveElementTo): send a real ConfigureNotify event. (ResizeElementTo): same. (ResizeElementBy): call MoveAndResizeElementBy with 0,0 for dx,dy. (MoveElementBy): call MoveAndResizeElementBy with 0,0 for dw,dh. (MoveAndResizeElementBy): both move and resize the element, and generate 1 ConfigureNotify. * compzilla/public/compzillaIWindowManager.idl: add a boolean "mapped" arg to WindowCreated, so we can reflect the current state of a window previously mapped (really only useful when adding windows that were already created when we start up.) * compzilla/src/compzillaControl.cpp: globally reindent the SPEW lines. Also, spew out the extension information as we query it. (SendConfigureNotify): new interface implementation. Send a synthetic ConfigureNotify event. (ConfigureWindow): new interface implementation. Send a real ConfigureNotify event. (ShowOutputWindow): make our region the same size as the display. (AddWindow): pass in a boolean telling the window manager if the window is already mapped. (Filter): we now do the WindowConfigured stuff in the ConfigureRequest case, and ignore ConfigureNotify events. * compzilla/public/compzillaIControl.idl: add two methods, one for sending a synthetic ConfigureNotify (SendSyntheticNotify) and one for actually configuring the window (ConfigureWindow). * compzilla/chrome/skin/compzilla.css: remove the explicit width/height from the .window class, and also make the debug spew smaller. * compzilla/src/compzillaWindow.cpp: add WITH_SPEW handling so we can turn off the spew. * compzilla/src/compzillaRenderingContext.cpp: add WITH_SPEW handling so we can turn off the spew. * compzilla/Makefile.am (libcompzilla_la_CPPFLAGS): add -DWITH_SPEW. 2007-04-19 Alex Graveley * compzilla/src/compzillaWindow.cpp (EnsurePixmap): Don't call XDamageCreate until here, since it'll fail if we aren't mapped yet. * compzilla/src/compzillaControl.cpp (ErrorHandler): Print error info to the console. This is mostly ripped from compiz. Make the X extension event and error results static so we can access them from here. 2007-04-19 Chris Toshok * compzilla/chrome/content/start.js: resize the desktopWindow element to the size of the screen. 2007-04-18 Alex Graveley * compzilla/src/nsKeycodes.h: New file, copied nsKeycodes and nsSunKeycodes DOM<->GDK keysym tables from mozilla/widget/src/gtk/nsGtkEventHandler.cpp. * compzilla/src/compzillaWindow.cpp (DOMKeyCodeToKeySym): New, converts a DOM keyCode to a GDK keysym. (SendKeyEvent): Use DOMKeyCodeToKeySym and XKeysymToKeycode to get the proper X keycode to forward to the native window. * compzilla/src/compzillaControl.cpp (Filter): We're the only ones who should process DAMAGE events, so remove them. Also change DEBUG -> SPEW, to avoid conflicting with the define used by nsDebug.h. 2007-04-18 Alex Graveley * compzilla/src/compzillaWindow.cpp (HandleEvent): Initial FocusIn/Out, DOMMouseScroll, and KeyPress/Release support. * compzilla/src/compzillaControl.cpp (InitOutputWindow): Call XSetInputFocus for the Moz window. * compzilla/components/compzillaWindowManager.js: Set content.tabIndex=1 so the canvas elements are focusable. 2007-04-15 Alex Graveley * compzilla/src/compzillaControl.cpp (InitWindowState): If we're the window manager, add all existing windows. Init Shape extension. Remove DEMO_HACK. (WindowDamaged): Move XDamageNotify handler to here. 2007-04-14 Chris Toshok * compzilla/src/compzillaRenderingContext.cpp (Redraw): fix the non-1.8 branch case for scaling the rectangle. 2007-04-13 Alex Graveley * compzilla/src/compzillaRenderingContext.cpp (Redraw): Convert damaged rect to Twips, using the nsPresContext. * compzilla/src/compzillaWindow.cpp (compzillaWindow): Use manual redirection, and XDamageReportRawRectangles. 2007-04-12 Chris Toshok * compzilla/components/compzillaWindowManager.js (HookupChromeEvents): make the mousedown handler a capture phase event handler, so we can raise the window if we mouse down anywhere on it, and still have it end up going to the native window. 2007-04-12 Chris Toshok * compzilla/src/compzillaControl.cpp: use the new hotness. * compzilla/src/compzillaRenderingContext.h: new improved api. * compzilla/src/compzillaRenderingContext.cpp: rework this so we don't copy twice, we only ever blit anything in ::Render. 2007-04-12 Alex Graveley * compzilla/src/compzillaRenderingContext.cpp: Drop non-thebes, non-render fallback code and remove mImageSurfaceData. (CopyImageDataFrom): For non-thebes, avoid XGetImage and call cairo_xlib_surface_create for the drawable to avoid copying data. * compzilla/src/compzillaControl.cpp (Filter): Pass window's visual to CopyImageDataFrom. 2007-04-11 Alex Graveley * compzilla/src/compzillaWindow.cpp (SendMouseEvent): Make mouse event sending sorta work. Use new GetSubwindowAtPoint to get destination subwindow, and fake enter/leave events when the subwindow changes. 2007-04-11 Chris Toshok * compzilla/chrome/skin/compzilla.css: add the overlay div's style. * compzilla/chrome/skin/desktop.html: add the overlay div here so people can add their widgets. * compzilla/src/compzillaRenderingContext.cpp (CopyImageDataFrom): fix a copy of glaring memory leaks. we seem okay with memory now. 2007-04-10 Alex Graveley * compzilla/src/compzillaControl.cpp (Filter): Call XSetInputFocus on MapRequest. * compzilla/src/compzillaWindow.cpp (HandleEvent): Send MotionNotify events if DOM eventtype is "mousemove". (SendMouseEvent): Set ButtonMotionMask correctly. 2007-04-10 Chris Toshok * compzilla/components/compzillaWindowManager.js: add an EWMH inspired layered window stack. * compzilla/chrome/skin/desktop.html: add an html tag, just cuz. * compzilla/chrome/skin/compzilla.css: add overflow: hidden to the html element, so we never see scrollbars on our desktop. 2007-04-10 Chris Toshok * compzilla/components/compzillaWindowManager.js: fairly big changes. Clean up some errors that were screwing up sizing/scaling of override windows. Also, add code to remove the wm chrome, and make it so you can call CreateWMChrome/DestroyWMChrome multiple times on the same window, which can happen when the _NET_WM_WINDOW_TYPE property is set on a window. Add support for this property, so we now get a borderless panel (which isn't override_redirect, but is decorationless.) * compzilla/public/compzillaIControl.idl: add InternAtom and GetAtomProperty, and change signature for GetStringProperty. * compzilla/src/compzillaWindow.cpp: fix build on minefield. * compzilla/public/compzillaIWindowManager.idl: add x/y/w/h args to WindowCreated, and change PropertyChanged to take the atom instead of the string name. * compzilla/src/compzillaControl.cpp (InternAtom): new method, callable from JS. (GetStringProperty): we pass the atom, not the property name. (GetAtomProperty): new method, returns the atom value of a property. (InitManagerWindow): create the offscreen window and grab the window manager + compositor selections. we aren't graceful about replacing an existing wm here. (AddWindow): add the x/y/width/height to the WindowCreated method call, so we can create the chrome of the right size. (PropertyChanged): pass the atom now, not the name. * compzilla/src/compzillaControl.h: change signature for PropertyChanged, and add manager window foo. 2007-04-10 Alex Graveley * compzilla/src/compzillaWindow.cpp (SendMouseEvent): Adjust button+1, since DOM event buttons start at 0; (TranslateClientXYToWindow): New. Adjusts a client x/y for the canvas frame's screen offset. This seems to make button events work in the Metacity case, but focus stealing is preventing it in the standalone case. * compzilla/src/compzillaControl.cpp: Add commented out XEVIE stuff. (Filter): Handle MapRequest and ConfigureRequest by just calling XMapRaised and XMoveResizeWindow respectively; eventually this should call the JS and allow for stopping/mutating the event. (InitWindowState): XSelectInput on the root win for SubstructureRedirectMask, and if errors occur (i.e. a WM is running), try again without it. * compzilla/src/compzillaControl.h: Keep an XError count, and add ClearError which returns the last count. This is used to detect an existing WM. * compzilla/src/compzillaWindow.cpp: New. Replaces CompositingWindow with an nsIDOMEventHandler subclass. * compzilla/src/compzillaModule.cpp: Use NS_GENERIC_FACTORY_CONSTRUCTOR(compzillaRenderingContext). * compzilla/src/compzillaRenderingContext.cpp: Drop CZ_NewRenderingContext. Fix some whitespace.