Derek Foreman [Mon, 28 Jun 2010 18:24:58 +0000 (14:24 -0400)]
add new context to sync with frame.h
fir strcmp() misuse
Dana Jansens [Sun, 27 Jun 2010 22:43:13 +0000 (18:43 -0400)]
Use a GSource instead of adding/removing idle functions for drawing the screen in composite
Dana Jansens [Sun, 27 Jun 2010 22:15:03 +0000 (18:15 -0400)]
Make sure the window exists when naming its pixmap or redirecting it, and only create its damage while its redirected.
This uses one round trip for XGet* instead of two XSyncs to check for
errors (and is the recommended method for the name pixmap case).
Dana Jansens [Sun, 27 Jun 2010 18:25:19 +0000 (14:25 -0400)]
destroy pixmap on disable, and dont error if it fails
Dana Jansens [Sun, 27 Jun 2010 18:18:40 +0000 (14:18 -0400)]
make the root background color a config option, and add name_window_pixmap() helper function
Dana Jansens [Sun, 27 Jun 2010 17:46:47 +0000 (13:46 -0400)]
draw the root pixmap, and bind the glxpixmap to the texture only once
NOTE: derek please check my use of glTexEnvi (it seems to be working but idk)
root pixmap comes from _XROOTPMAP_ID and ESETROOT_PMAP_ID
the glxpixmap only needs to be bound to the texture once after the glxpixmap
is created, so do that rather than every time we draw the texture.
added create_glx_pixmap(), bind_glx_pixmap(), and destroy_glx_pixmap()
functions in composite.c to help wth this process
added a "bound" variable to ObWindow that tracks if the glxpixmap was
successfully bound to the texture, so when we destroy the glxpixmap, we can
tell if we should unbind/release it from the texture
Dana Jansens [Sun, 27 Jun 2010 16:02:44 +0000 (12:02 -0400)]
Add signal handling with the GMainLoop
Provided through a very simplistic interface in obt, found in the
obt/signal.[ch] files
Dana Jansens [Sun, 27 Jun 2010 13:35:56 +0000 (09:35 -0400)]
Watch stacking changes on managed windows also, as this can change the "above" relationship for unmanaged windows
Dana Jansens [Sun, 27 Jun 2010 12:38:02 +0000 (14:38 +0200)]
Track the sibling that unmanaged windows are above
so we don't do the work of reordering them in the stacking lists for
ConfigureNotify events where their stacking order didn't change
Dana Jansens [Sun, 27 Jun 2010 11:27:14 +0000 (13:27 +0200)]
Redraw the screen when a ObWindow is destroyed, but not on every related event
We won't get an event we recognize is a window if we destroy the window
(such as a MenuFrame going away), as the event will no longer be tracable
to that window.
Also don't redraw on every map/unmap/configurenotify we see, just ones for
the top-level windows.
Dana Jansens [Sat, 26 Jun 2010 22:19:37 +0000 (00:19 +0200)]
make sure the screen_support_win does not end up getting managed as an "unmanaged" window also
Dana Jansens [Sat, 26 Jun 2010 00:01:03 +0000 (02:01 +0200)]
Fix stacking of unmanaged windows and managing windows on restart.
keep inputonly windows in the stacking order
create hashtables in stacking.[ch] to find windows in the stacking lists by
their window id
make the screen support window be an obwindow since it is a child of root
and so windows can stack relative to it.
allow unmanaged windows to change their stacking order and track the changes
for display
on restart manage unmapped windows as "unmanaged" as well as override-redirect
windows (the code paths here changed a fair bit, allowing fewer repetitive
XGetWindowAttributes calls)
adds a ObStackingIter data structure and functions in stacking.[ch] that allow
you to iterate through all the windows (managed and unmanaged) together in
the order they should appear on screen.
Dana Jansens [Sat, 26 Jun 2010 15:14:14 +0000 (17:14 +0200)]
Don't mishandle ConfigureNotify on redirect windows from before they were
reparented.
Dana Jansens [Sat, 26 Jun 2010 14:59:16 +0000 (16:59 +0200)]
passing the wrong pointer
Dana Jansens [Sat, 26 Jun 2010 22:56:17 +0000 (00:56 +0200)]
use the g_idle func to reduce cpu load
Derek Foreman [Fri, 25 Jun 2010 21:19:45 +0000 (17:19 -0400)]
Attempt to minimize redraws when not in "animation" mode.
Note: this code is incorrect. Some events seem to be delayed.
Derek Foreman [Fri, 25 Jun 2010 16:29:12 +0000 (12:29 -0400)]
Vsync waits on systems that support GLX_EXT_swap_control
Dana Jansens [Fri, 25 Jun 2010 17:43:21 +0000 (19:43 +0200)]
unredirect on a window with bad timing can cause a BadValue error
exemplified by right clicking on wbar a lot causing it to remap itself
Dana Jansens [Fri, 25 Jun 2010 17:01:49 +0000 (19:01 +0200)]
ignore errors when creating a damage for a window (as the window may no longer exist)
it generates a baddrawable error, which is not ignored by default like badwindow
Dana Jansens [Fri, 25 Jun 2010 16:42:12 +0000 (18:42 +0200)]
Fix restart and unmanaging windows in composite
When restarting, catch unmapped windows as ObUnmanaged objects
When unmanaging a client, ignore the ReparentNotify to root, rather than
thinking the unmanaged window is now embedded somewhere
Also add some ob_debug's for unmanaged event handling
Dana Jansens [Fri, 25 Jun 2010 16:11:27 +0000 (18:11 +0200)]
handle windows that get embedded such as systray stuff.
stop redirecting and watching them when they are reparented away from root and
vice versa
Derek Foreman [Fri, 25 Jun 2010 15:48:31 +0000 (11:48 -0400)]
add borders
Dana Jansens [Fri, 25 Jun 2010 12:57:19 +0000 (14:57 +0200)]
Add shape support to the composite code.
Keeps the window's shape in an array of XRectangles in the ObWindow.
Also, moved the event handlers that are handled for ObWindows rather than
subclasses into a function event_handle_window(). The function returns a
bool saying it the event can also be handled by others or should be treated
as finished.
Dana Jansens [Fri, 25 Jun 2010 12:55:34 +0000 (14:55 +0200)]
Change shape test program
make it set an initial shape that also is inside the border and then resize
and set a new shape after a pause
Dana Jansens [Fri, 25 Jun 2010 11:04:18 +0000 (13:04 +0200)]
Allow ObWindow subclasses to redirect a child window of the top-level window
This means ObClient redirects the client window itself, rather than the
parenting frame window.
Added a "toparea" to the ObWindow that tracks the top-level window's area,
so the "area" can track the redirected window's area inside the top-level
window.
Added window_set_top_area() that must be called before window_set_abstract()
for subclasses of ObWindow. This sets the initial position/size/border of
ObWindow's top-most window, that will be given in window_set_abstract().
After that, it can track any changes made to the window's geometry on its
own.
Decor is now invisible since it needs to be drawn by the Compositing code
explicitly.
Dana Jansens [Thu, 24 Jun 2010 19:37:53 +0000 (21:37 +0200)]
Rename the size to 'bytes' for the size of the window struct
Dana Jansens [Thu, 24 Jun 2010 19:37:38 +0000 (21:37 +0200)]
missing a header
Derek Foreman [Tue, 22 Jun 2010 21:09:32 +0000 (17:09 -0400)]
replace our gl extension handling with GLEW
Derek Foreman [Tue, 22 Jun 2010 18:35:18 +0000 (14:35 -0400)]
Add libglew to the build
Dana Jansens [Wed, 16 Jun 2010 18:04:49 +0000 (14:04 -0400)]
freeing the (invalid) pixmap id returned from the namewindowpixmap function when it errors will also generate an error
also add error checking around the other composite-related X calls for testing
Dana Jansens [Wed, 16 Jun 2010 17:25:27 +0000 (13:25 -0400)]
better use of XCompositeQueryVersion
Dana Jansens [Wed, 16 Jun 2010 17:24:58 +0000 (13:24 -0400)]
fix deps for Openbox, it uses XComposite functions directly so it should link against the lib
Dana Jansens [Fri, 11 Jun 2010 21:26:48 +0000 (17:26 -0400)]
we probly get more events for clients than for unmanaged windows
Dana Jansens [Fri, 11 Jun 2010 21:10:06 +0000 (17:10 -0400)]
handle configurerequests on unmanaged windows again
Dana Jansens [Fri, 11 Jun 2010 20:20:43 +0000 (16:20 -0400)]
when managing a window, make sure its area is within its min/max bounds
Dana Jansens [Fri, 11 Jun 2010 19:52:27 +0000 (15:52 -0400)]
support for _NET_WM_WINDOW_OPACITY
Dana Jansens [Fri, 11 Jun 2010 19:51:09 +0000 (15:51 -0400)]
remove redundant variable assignment
Dana Jansens [Fri, 11 Jun 2010 18:38:56 +0000 (14:38 -0400)]
Make composite code more reliable and correct.
use glXDestroyPixmap not glXDestroyGLXPixmap (since we use glXCreatePixmap)
send a client message after taking the composite selection.
allow others to take the composite selection and disable our compositing gracefully, destroying our selection window.
start composite before anything that will create an ObWindow
Dana Jansens [Fri, 11 Jun 2010 17:31:09 +0000 (13:31 -0400)]
Make a debug type for composite messages. Turn it on by default for now.
Dana Jansens [Fri, 11 Jun 2010 16:11:44 +0000 (12:11 -0400)]
Clean up the composite stuff a bunch.
Fix a bunch of memory leaks.
Clean up composite.h to only have things that are needed externally right now (can add more back later as needed)
Don't use a singleton struct to hold all the composite things
Shutdown cleanly so Xorg radeon driver doesn't crash
Release resources when composite fails to init
Dana Jansens [Fri, 11 Jun 2010 15:54:48 +0000 (11:54 -0400)]
don't leak serial ignores on shutdown
Dana Jansens [Fri, 11 Jun 2010 15:48:00 +0000 (11:48 -0400)]
don't leak type_str in config.c
Dana Jansens [Thu, 10 Jun 2010 23:26:52 +0000 (19:26 -0400)]
Show unmanaged windows in composite. *Stacking will be broken though still!!*
adds window_cleanup() that subclasses of ObWindow call to tell the parent they are going away, allowing it to clean up using the abstract pointers.
unmanaged windows get OB_STACKING_LAYER_ALL, but the stacking code is not made to handle this value yet. unexpected behaviour may result !
Dana Jansens [Thu, 10 Jun 2010 22:55:47 +0000 (18:55 -0400)]
consistent use of glXDestroyGLXPixmap
Derek Foreman [Thu, 10 Jun 2010 22:12:40 +0000 (18:12 -0400)]
release texture when we're done
Dana Jansens [Thu, 10 Jun 2010 20:41:08 +0000 (16:41 -0400)]
Make pixel's allocated by ObRender opaque on 32-bit visuals by adding 0xff<<24 to them
Dana Jansens [Thu, 10 Jun 2010 20:29:47 +0000 (16:29 -0400)]
take the window's border width into account when drawing the window
Dana Jansens [Thu, 10 Jun 2010 20:06:03 +0000 (16:06 -0400)]
destroy the glxpixmap before the xpixmap it was made from to avoid a segfault in some gl drivers
Dana Jansens [Thu, 10 Jun 2010 18:20:41 +0000 (14:20 -0400)]
only take events for compositing that should be taken, and fix some style things
Dana Jansens [Thu, 10 Jun 2010 20:00:49 +0000 (16:00 -0400)]
make sure the window's pixmap and glxpixmap worked out before drawing the window
Dana Jansens [Thu, 10 Jun 2010 20:00:23 +0000 (16:00 -0400)]
don't draw windows if they are not "visible" rather than only considering their current desktop
Dana Jansens [Thu, 10 Jun 2010 18:17:18 +0000 (14:17 -0400)]
Specify the GLX_TEXTURE_TARGET_EXT when creating a glXPixmap
This is a workaround for non-spec drivers. See issue #4 here: http://www.opengl.org/registry/specs/EXT/texture_from_pixmap.txt
A default should be chosen, but it is not. We assume that GL_ARB_texture_non_power_of_two is present for now, and just always ask for a GL_TEXTURE_2D texture
Dana Jansens [Thu, 10 Jun 2010 18:00:20 +0000 (14:00 -0400)]
create the gltexture for an obwindow when you hear about the top-level window creation.
was occuring before gl was initialized.
Dana Jansens [Thu, 10 Jun 2010 16:12:27 +0000 (12:12 -0400)]
ignore all BadDamage errors, just like BadWindow. a valid damage id can disappear at any time
Derek Foreman [Thu, 10 Jun 2010 16:47:06 +0000 (12:47 -0400)]
properly render windows when they're on all desktops
Dana Jansens [Thu, 10 Jun 2010 16:08:46 +0000 (12:08 -0400)]
put code inside 80 cols, and make error messages translatable, and a couple small cleanups, and get rid of some warnings
Dana Jansens [Thu, 10 Jun 2010 15:42:35 +0000 (11:42 -0400)]
add a --indirect command line option that uses indirect rendering for compositing
Derek Foreman [Thu, 10 Jun 2010 16:03:37 +0000 (12:03 -0400)]
Add a really sketchy glGetError() test
Dana Jansens [Thu, 10 Jun 2010 15:20:29 +0000 (11:20 -0400)]
using a window's damage (incl. freeing it) can cause a BadDamage error if the window disappeared. ignore the error.
Dana Jansens [Thu, 10 Jun 2010 14:44:11 +0000 (10:44 -0400)]
choose an fbconfig without double buffer, and with smallest stencil/depth buffer possible (to save mem?)
also, save the fbconfig's texture format rather than assuming it is RGBA
Dana Jansens [Thu, 10 Jun 2010 14:43:49 +0000 (10:43 -0400)]
include event.h for event_time()
Dana Jansens [Wed, 9 Jun 2010 23:08:31 +0000 (19:08 -0400)]
Rework ObWindow for better inheritence.
add window_new() that allocates an ObWindow (also works for a subclass)
add window_free() that frees it.
add window_set_abstract() that a subclass must call to set up the ObWindow's
"abstract class" functionality
add abstract properties in ObWindow: depth, top, layer.
make all the existing ObWindows use the new window_foo() functions.
Derek Foreman [Thu, 10 Jun 2010 02:59:53 +0000 (22:59 -0400)]
add "mapped" and "area" to obwin so the composite can get sizes right and properly handle internal windows
Derek Foreman [Wed, 9 Jun 2010 21:31:52 +0000 (17:31 -0400)]
call the correct function to destroy glxpixmaps
Derek Foreman [Wed, 9 Jun 2010 21:10:37 +0000 (17:10 -0400)]
ObInternalWindow now has an ObWindow instead of a type.
Derek Foreman [Wed, 9 Jun 2010 20:04:10 +0000 (16:04 -0400)]
Basic compositing with GL
Dana Jansens [Thu, 26 Jul 2007 00:49:50 +0000 (20:49 -0400)]
change the root event mask to add SubstructureNotifyMask, so we can hear about Override-redirect windows
Dana Jansens [Mon, 7 Jun 2010 17:55:19 +0000 (13:55 -0400)]
add composite.h to openbox.c
Dana Jansens [Mon, 7 Jun 2010 17:26:43 +0000 (13:26 -0400)]
Add composite.[ch] files. Enable composite based on a new config variable 'config_comp'.
If composite cannot be enabled, the config var is set back to FALSE.
Dana Jansens [Sun, 20 Jan 2008 07:17:41 +0000 (02:17 -0500)]
Check for compositing manager support requested, and the required components.
Will turn on compositing, and set USE_COMPOSITING, when XComposite, XDamage,
XRender, XFixes, and GL/GLX are available.
Also checks for the XFixes, XRender, XComposite, and XDamage extensions at
runtime when USE_COMPOSITING is enabled by configure
Derek Foreman [Fri, 21 May 2010 21:42:27 +0000 (17:42 -0400)]
pervert makefile rules to conform to ylwrap insanity yet still give us a clean global namespace.
Derek Foreman [Fri, 21 May 2010 21:05:29 +0000 (17:05 -0400)]
remove auto generated code during make clean
Dana Jansens [Fri, 21 May 2010 19:37:39 +0000 (15:37 -0400)]
fix header includes in obtheme
some should point to other dirs, and some need to point to the renamed
parser.y's new output parser.h
Dana Jansens [Fri, 21 May 2010 18:43:12 +0000 (14:43 -0400)]
Add obtheme/ to the build system
Had to rename the .y file so it didn't clash
Added a Makefile stub in the directory to run the top level Makefile
Derek Foreman [Fri, 21 May 2010 15:56:19 +0000 (11:56 -0400)]
add the new theme framework
Derek Foreman [Thu, 20 May 2010 23:41:16 +0000 (19:41 -0400)]
add a RECT_ADD macro
Dana Jansens [Wed, 19 May 2010 21:00:38 +0000 (17:00 -0400)]
remove all window decorations except a border and add a bunch of comments
Dana Jansens [Sat, 26 Jun 2010 22:59:16 +0000 (00:59 +0200)]
80 cols
Mikael Magnusson [Sat, 26 Jun 2010 14:08:30 +0000 (16:08 +0200)]
Continue parsing contexts when an unsupported one is encountered
Mikael Magnusson [Sat, 26 Jun 2010 13:55:40 +0000 (15:55 +0200)]
Make the dock a context and add actions LowerDock and RaiseDock
Mikael Magnusson [Sat, 26 Jun 2010 11:55:39 +0000 (13:55 +0200)]
Move usage of iconh into the branch that assigns it
Mikael Magnusson [Sat, 26 Jun 2010 11:45:45 +0000 (13:45 +0200)]
settings can't be NULL here, or we'd have already crashed anyway
Mikael Magnusson [Fri, 25 Jun 2010 11:04:39 +0000 (13:04 +0200)]
Use a gsource instead of gio channels for watching x events
Fixes not getting some focusin events sometimes.
Dana Jansens [Wed, 16 Jun 2010 17:25:39 +0000 (13:25 -0400)]
obt returns libxml2 structures directly, so anyone linking against it better also link to libxml2
Dana Jansens [Mon, 14 Jun 2010 17:52:21 +0000 (13:52 -0400)]
add XFlush to g_timeout callbacks
GMainLoop doesn't cause an flush to occur after handling a timeout.
Dana Jansens [Mon, 14 Jun 2010 16:15:02 +0000 (12:15 -0400)]
Fix the EXTENTS reported on window frames.
Change the order things are done on map, so we apply startup state without
any states set first, thus getting all the functions possible for the window
type etc. then change the order states are applied, as some remove the
ability to apply others (ie fullscreen comes last).
Add an oldsize to ObFrame that remembers the size of the frame last reported to
the world through the EXTENTS property. If you frame_adjust_area(FAKE) then
frame_adjust_area(NONFAKE), the EXTENTS would not be updated since the
oldsize wasn't remembered across fake updates.
Make the extentsrequest test ask about windows with states set also.
Dana Jansens [Wed, 9 Jun 2010 14:38:55 +0000 (10:38 -0400)]
keep stacking_list_tail a pointer to the tail of the stacking list
Dana Jansens [Wed, 9 Jun 2010 13:31:06 +0000 (09:31 -0400)]
allow a user to set "undecorated" on a window without decorations
if not based on window type, the app may decide to have decorations again
sometime. this was not always legal but chromium has made it so.
Dana Jansens [Thu, 3 Jun 2010 20:08:18 +0000 (16:08 -0400)]
add an inotify watcher for directories (doesnt work without inotify yet)
Dana Jansens [Tue, 8 Jun 2010 21:50:23 +0000 (17:50 -0400)]
Use GMainLoop instead of ObtMainLoop
Dana Jansens [Thu, 3 Jun 2010 17:57:47 +0000 (13:57 -0400)]
save the list of mime types listed as supported by an application
Dana Jansens [Thu, 3 Jun 2010 17:53:19 +0000 (13:53 -0400)]
parse app Categories better. parse a list of strings into a gchar**
Dana Jansens [Thu, 3 Jun 2010 17:09:38 +0000 (13:09 -0400)]
parse Categories tag and save them as an array of GQuarks
Dana Jansens [Thu, 3 Jun 2010 16:10:54 +0000 (12:10 -0400)]
improved .desktop parsing.
properly (and quickly) check for existence of required keys
figure out what an app can open from its exec key
validate the %fields in an app's exec key
Dana Jansens [Thu, 3 Jun 2010 15:58:13 +0000 (11:58 -0400)]
free the user's group ids
Dana Jansens [Thu, 3 Jun 2010 15:56:15 +0000 (11:56 -0400)]
free the path dirs
Dana Jansens [Sat, 22 May 2010 00:10:34 +0000 (20:10 -0400)]
parse Path, Terminal, and StartupNotify
Dana Jansens [Sat, 22 May 2010 00:03:21 +0000 (20:03 -0400)]
parse OnlyShowIn/NotShowIn
Dana Jansens [Fri, 21 May 2010 20:51:45 +0000 (16:51 -0400)]
allow new windows on other desktops to get focused if specified in a per-app rule
you can not client_active() with user=false and desktop=true and activate things on other desktops, by the general focus steal restrictions, if you wanted to do that sorta thing
Mikael Magnusson [Thu, 6 Mar 2008 19:06:38 +0000 (20:06 +0100)]
Allow sending windows on other desktops to the current desktop.