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 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 [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 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 [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 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 [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.
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 [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 [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
Dana Jansens [Tue, 18 May 2010 22:47:54 +0000 (18:47 -0400)]
allows a window to unmax by resizing.
makes "clever" use of the client's pre_max_area values to allow this to happen
without flashing, and preserving them in case the user cancels the resize
after it has become unmaximized.
Dana Jansens [Tue, 18 May 2010 01:58:44 +0000 (21:58 -0400)]
set the interactive action to NULL before doing its cleanup phase
if the cleanup ends up cancelling the "current interactive action", it would
cause the end function to be called again, which sucks. for instance if the
cleanup function uses the Focus action. this prevents the unwanted loop
into the interactive action cleanup.
Mikael Magnusson [Fri, 16 Apr 2010 16:04:24 +0000 (18:04 +0200)]
Add support for using relative expressions in move and resize actions
Have MoveResizeTo use config_parse_gravity_coord instead of duplicating it locally
Allow MoveResizeTo positions and sizes and per app positions to be relative to screen size
Rename to config_parse_relative_number so it can be used for sizes too
Add relative numbers to width/height in MoveResizeTo
Add relative numbers to MoveRelative
Add relative numbers to ResizeRelative, these are for the client size, not screen size
Dana Jansens [Tue, 11 May 2010 23:01:46 +0000 (19:01 -0400)]
add cleanup functions to the client list menus that removes everything from them when they are not being shown (saves iterating thru the list uselessly when a client is unmanaged)