]> code.delx.au - spectrwm/log
spectrwm
11 years agoFix freebsd makefile.
Reginald Kennedy [Fri, 20 Jul 2012 09:18:55 +0000 (17:18 +0800)]
Fix freebsd makefile.

Submitted by Erandir.

11 years agoBegin checking the xcb_get_property_reply before using the value.
Reginald Kennedy [Fri, 20 Jul 2012 01:38:27 +0000 (09:38 +0800)]
Begin checking the xcb_get_property_reply before using the value.

11 years agorevert getstate change. made windows disappear.
David Hill [Fri, 20 Jul 2012 01:00:24 +0000 (21:00 -0400)]
revert getstate change.  made windows disappear.

11 years agoin getstate(), we need to fetch type XCB_ATOM_ATOM, not the atom.
David Hill [Fri, 20 Jul 2012 00:32:52 +0000 (20:32 -0400)]
in getstate(), we need to fetch type XCB_ATOM_ATOM, not the atom.

11 years agoUse intermediate pointer in getstate().
Reginald Kennedy [Thu, 19 Jul 2012 23:40:29 +0000 (07:40 +0800)]
Use intermediate pointer in getstate().

11 years agoapply XftDraw to search_win
David Hill [Thu, 19 Jul 2012 23:19:03 +0000 (19:19 -0400)]
apply XftDraw to search_win

11 years agoFix bar text vertical positioning.
Reginald Kennedy [Thu, 19 Jul 2012 22:16:28 +0000 (06:16 +0800)]
Fix bar text vertical positioning.

Remove extra vertical padding from bar.

11 years agoallow core fonts to load again. this may need more magic.
David Hill [Thu, 19 Jul 2012 19:52:15 +0000 (15:52 -0400)]
allow core fonts to load again.  this may need more magic.

11 years agospaces no longer allowed in separating fonts. use only , instead.
David Hill [Thu, 19 Jul 2012 18:26:56 +0000 (14:26 -0400)]
spaces no longer allowed in separating fonts.  use only , instead.

Makes use able to use fonts with spaces in their names.

11 years agoDon't try to setup the bar if it already exists.
Reginald Kennedy [Thu, 19 Jul 2012 17:33:42 +0000 (01:33 +0800)]
Don't try to setup the bar if it already exists.

11 years agoUse the same font on all bars.
Reginald Kennedy [Thu, 19 Jul 2012 17:19:19 +0000 (01:19 +0800)]
Use the same font on all bars.

Don't close font and color each time bar_setup is called.

11 years agoFix parse_rgb() 8-bit to 16-bit color conversion
Reginald Kennedy [Thu, 19 Jul 2012 17:01:04 +0000 (01:01 +0800)]
Fix parse_rgb() 8-bit to 16-bit color conversion
For example, 0xff should convert to 0xffff, not 0xff00.

Fix bar_setup to properly convert the color pixel value to XRenderColor.

Rename swm_screen.c[].color to swm_screen.c[].pixel.

Add new get_ws_idx function.

Use 1 and 0 instead of the Xlib macros 'True' and 'False'.

Fix print_win_geom to not crash when the supplied window is invalid.

Fix windows disappearing on restart.
For now, go back to setting the state iconic in unmap_window.

Add '(void)var;' in functions where var is required but unused.
When using the -Wextra compiler flag, the warning for those variables is
suppressed thereby making it easier to spot warnings that could use our
attention.

Fix type conversion warning in swm_hack.c

Use global atoms where applicable.

11 years agoFix some styling.
Reginald Kennedy [Thu, 19 Jul 2012 06:16:57 +0000 (14:16 +0800)]
Fix some styling.

11 years agouse %ld to print longs
David Hill [Thu, 19 Jul 2012 03:14:56 +0000 (23:14 -0400)]
use %ld to print longs

11 years agobetter Xft support.
David Hill [Thu, 19 Jul 2012 03:12:58 +0000 (23:12 -0400)]
better Xft support.

11 years agoSet window state to withdrawn, instead of iconic, when switching ws.
Reginald Kennedy [Wed, 18 Jul 2012 15:17:37 +0000 (23:17 +0800)]
Set window state to withdrawn, instead of iconic, when switching ws.

Add more debug messages.

11 years agoA better fix.
Reginald Kennedy [Wed, 18 Jul 2012 11:54:29 +0000 (19:54 +0800)]
A better fix.
Explicitly set event queue owner to XCB since it is Xlib by default.
Xlib errors are now passed to the XCB event queue!

11 years agoFix Xlib exiting on error.
Reginald Kennedy [Wed, 18 Jul 2012 01:10:47 +0000 (09:10 +0800)]
Fix Xlib exiting on error.

11 years agoOops, bar_font conflicted, renamed bar_font to font in bar_setup.
Reginald Kennedy [Tue, 17 Jul 2012 20:45:24 +0000 (04:45 +0800)]
Oops, bar_font conflicted, renamed bar_font to font in bar_setup.

Add the correct libraries and include to linux Makefile.

11 years agoRemove unneeded bar_fs_height variable.
Reginald Kennedy [Tue, 17 Jul 2012 20:11:55 +0000 (04:11 +0800)]
Remove unneeded bar_fs_height variable.

Rename bar_fs to bar_font.

Remove some whitespace.

11 years agostart of Xft. blows up.
David Hill [Tue, 17 Jul 2012 20:03:30 +0000 (16:03 -0400)]
start of Xft.  blows up.

11 years agoFix linux makefile.
Reginald Kennedy [Tue, 17 Jul 2012 20:59:24 +0000 (04:59 +0800)]
Fix linux makefile.

11 years agodont errx when xcb_query_font_reply fails + spaces
Marco Peereboom [Tue, 17 Jul 2012 19:50:05 +0000 (14:50 -0500)]
dont errx when xcb_query_font_reply fails + spaces

11 years agobring back the Display variable. Will be needed for the font code.
David Hill [Tue, 17 Jul 2012 18:52:32 +0000 (14:52 -0400)]
bring back the Display variable.  Will be needed for the font code.

11 years agomake search_win use the same font as the bar
David Hill [Tue, 17 Jul 2012 06:40:05 +0000 (02:40 -0400)]
make search_win use the same font as the bar

11 years agofix up search_win to use new font code calculations as well.
David Hill [Tue, 17 Jul 2012 06:34:51 +0000 (02:34 -0400)]
fix up search_win to use new font code calculations as well.

11 years agoa reasonable first attempt to get the bar and bar fonts to look nice.
David Hill [Tue, 17 Jul 2012 06:02:07 +0000 (02:02 -0400)]
a reasonable first attempt to get the bar and bar fonts to look nice.

some calculations may need to be adjusted.

11 years agoallow bar_font to work again.
David Hill [Tue, 17 Jul 2012 03:23:40 +0000 (23:23 -0400)]
allow bar_font to work again.

11 years agodrop some X11 includes, begone Xlib!
Marco Peereboom [Tue, 17 Jul 2012 00:49:42 +0000 (19:49 -0500)]
drop some X11 includes, begone Xlib!

11 years agoRemove an empty line.
Reginald Kennedy [Tue, 17 Jul 2012 00:21:19 +0000 (08:21 +0800)]
Remove an empty line.

11 years agoFix xrandr epileptic seizure issue.
Reginald Kennedy [Tue, 17 Jul 2012 00:17:22 +0000 (08:17 +0800)]
Fix xrandr epileptic seizure issue.

11 years agoFix issue where _NET_ACTIVE_WINDOW is ignored on unmapped, unmanaged
Reginald Kennedy [Mon, 16 Jul 2012 19:07:26 +0000 (03:07 +0800)]
Fix issue where _NET_ACTIVE_WINDOW is ignored on unmapped, unmanaged
windows. Skype works!

Move atom name query in propertynotify to a separate function.

Rename active_wm() to enable_wm() since the purpose of the function is
to enable X window management.  The error check is now done within the
function. Like before, return 0 on success; 1 on failure.

New debug type: SWM_D_INIT

More type casting.

11 years agoadd a couple more xcb_flush()'s
David Hill [Mon, 16 Jul 2012 19:04:52 +0000 (15:04 -0400)]
add a couple more xcb_flush()'s

11 years agoFix a few more -Wextra warnings.
Reginald Kennedy [Mon, 16 Jul 2012 10:15:48 +0000 (18:15 +0800)]
Fix a few more -Wextra warnings.

11 years agocast a few types to strtonum
David Hill [Mon, 16 Jul 2012 05:05:05 +0000 (01:05 -0400)]
cast a few types to strtonum

11 years agofix some sign compare warnings
David Hill [Mon, 16 Jul 2012 05:02:34 +0000 (01:02 -0400)]
fix some sign compare warnings

11 years agounused defines
David Hill [Mon, 16 Jul 2012 02:47:39 +0000 (22:47 -0400)]
unused defines

11 years agoremove no longer needed includes.
David Hill [Mon, 16 Jul 2012 01:00:13 +0000 (21:00 -0400)]
remove no longer needed includes.

11 years agoremove no longer used functions
David Hill [Mon, 16 Jul 2012 00:57:58 +0000 (20:57 -0400)]
remove no longer used functions

11 years agoremove unneeded warnings
David Hill [Mon, 16 Jul 2012 00:57:09 +0000 (20:57 -0400)]
remove unneeded warnings

11 years agoprefetch the xcb_randr_id so we don't block later
David Hill [Mon, 16 Jul 2012 00:45:20 +0000 (20:45 -0400)]
prefetch the xcb_randr_id so we don't block later

11 years agoremove extra lib dependancies from Makefile
David Hill [Mon, 16 Jul 2012 00:43:01 +0000 (20:43 -0400)]
remove extra lib dependancies from Makefile

11 years agoremove -lXlib-xcb and -lXtst. Replace with -lX11 and -lxcb.
David Hill [Mon, 16 Jul 2012 00:41:00 +0000 (20:41 -0400)]
remove -lXlib-xcb and -lXtst.  Replace with -lX11 and -lxcb.

-lX11 is still needed for keysym stuff.

11 years agoGet rid of XOpenDisplay. Use xcb_connect now!
David Hill [Mon, 16 Jul 2012 00:38:25 +0000 (20:38 -0400)]
Get rid of XOpenDisplay.  Use xcb_connect now!

11 years agoFix startup error by disabling all traces of xlib font sets.
Reginald Kennedy [Sun, 15 Jul 2012 19:41:18 +0000 (03:41 +0800)]
Fix startup error by disabling all traces of xlib font sets.
The XCreateFontSet() call was failing.

next step is to eliminate the remaining Xlib calls and get bar fonts to
work as they should.

11 years agoredo checking for an active wm with xcb
David Hill [Sun, 15 Jul 2012 18:23:26 +0000 (14:23 -0400)]
redo checking for an active wm with xcb

11 years agoremove commented out Xlib code
David Hill [Sun, 15 Jul 2012 20:27:00 +0000 (16:27 -0400)]
remove commented out Xlib code

11 years agoconvert XkbKeycodeToKeysym to xcb
David Hill [Sun, 15 Jul 2012 20:23:39 +0000 (16:23 -0400)]
convert XkbKeycodeToKeysym to xcb

11 years agoNoSymbol to XCB_NO_SYMBOL
David Hill [Sun, 15 Jul 2012 20:08:59 +0000 (16:08 -0400)]
NoSymbol to XCB_NO_SYMBOL

11 years agorename atom variables to begin with a_
David Hill [Sun, 15 Jul 2012 20:05:27 +0000 (16:05 -0400)]
rename atom variables to begin with a_

11 years agouse xcb instead of RootWindow
David Hill [Sun, 15 Jul 2012 18:50:07 +0000 (14:50 -0400)]
use xcb instead of RootWindow

11 years agomove some things into setup_globals()
David Hill [Sun, 15 Jul 2012 18:00:46 +0000 (14:00 -0400)]
move some things into setup_globals()

11 years agobar_update() on cycle_layout() for the indicator.
Reginald Kennedy [Sun, 15 Jul 2012 15:46:29 +0000 (23:46 +0800)]
bar_update() on cycle_layout() for the indicator.

11 years agoDrain EnterNotify in stack() when appropriate.
Reginald Kennedy [Sun, 15 Jul 2012 15:29:20 +0000 (23:29 +0800)]
Drain EnterNotify in stack() when appropriate.

11 years agoAdd event_drain() and drain EnterNotify where appropriate.
Reginald Kennedy [Sun, 15 Jul 2012 15:24:52 +0000 (23:24 +0800)]
Add event_drain() and drain EnterNotify where appropriate.

11 years agojust some minor cleanup. whitespace, cast types, etc
David Hill [Sun, 15 Jul 2012 14:12:56 +0000 (10:12 -0400)]
just some minor cleanup.  whitespace, cast types, etc

11 years agoget rid of the if 0 code. sick of seeing it.
David Hill [Sun, 15 Jul 2012 13:56:47 +0000 (09:56 -0400)]
get rid of the if 0 code.  sick of seeing it.

11 years agoSome OpenBSD styling cleanup.
Reginald Kennedy [Sun, 15 Jul 2012 13:26:41 +0000 (21:26 +0800)]
Some OpenBSD styling cleanup.
keyfunc names are now uppercase.

Add -Wextra to Linux Makefile for dev purposes.

Remove unneeded dummykeyfunc().

11 years agoUpdate freebsd Makefile.
Reginald Kennedy [Sun, 15 Jul 2012 13:17:19 +0000 (21:17 +0800)]
Update freebsd Makefile.

Submitted by Erandir

11 years agoAdd a few more xcb_flush().
Reginald Kennedy [Sun, 15 Jul 2012 09:26:47 +0000 (17:26 +0800)]
Add a few more xcb_flush().

Remove whitespace.

11 years agoAdd another xcb_flush() into a key position.
Reginald Kennedy [Sun, 15 Jul 2012 09:06:10 +0000 (17:06 +0800)]
Add another xcb_flush() into a key position.

11 years agoundo if 0 the select code.
David Hill [Sun, 15 Jul 2012 06:41:30 +0000 (02:41 -0400)]
undo if 0 the select code.

11 years agopid is not unsigned
David Hill [Sun, 15 Jul 2012 06:22:31 +0000 (02:22 -0400)]
pid is not unsigned

11 years agofix window_get_pid().
David Hill [Sun, 15 Jul 2012 06:19:22 +0000 (02:19 -0400)]
fix window_get_pid().

11 years agouse UINT32_MAX in xcb_get_property for atoms.
David Hill [Sun, 15 Jul 2012 04:25:20 +0000 (00:25 -0400)]
use UINT32_MAX in xcb_get_property for atoms.

11 years agofix ewmh_autoquirk to actually test the correct values
David Hill [Sun, 15 Jul 2012 04:23:16 +0000 (00:23 -0400)]
fix ewmh_autoquirk to actually test the correct values

11 years agoAdd xcb_flush() to key positions; remove from map_window_raised().
Reginald Kennedy [Sun, 15 Jul 2012 01:53:23 +0000 (09:53 +0800)]
Add xcb_flush() to key positions; remove from map_window_raised().

11 years agoAdd xcb_flush to wkill().
Reginald Kennedy [Sun, 15 Jul 2012 00:39:21 +0000 (08:39 +0800)]
Add xcb_flush to wkill().

11 years agoFix move() and resize() for mouse input.
Reginald Kennedy [Sat, 14 Jul 2012 23:44:41 +0000 (07:44 +0800)]
Fix move() and resize() for mouse input.

Remove useless visibilitynotify().

11 years agooops, this should compare to type and not response_type.
David Hill [Sat, 14 Jul 2012 22:48:37 +0000 (18:48 -0400)]
oops, this should compare to type and not response_type.
Fixes full screen.

11 years agoprint the atom type instead of the response type.
David Hill [Sat, 14 Jul 2012 22:43:31 +0000 (18:43 -0400)]
print the atom type instead of the response type.

11 years agoif 0 the select() code in the event loop.
David Hill [Sat, 14 Jul 2012 21:53:41 +0000 (17:53 -0400)]
if 0 the select() code in the event loop.
I have no idea the purpose of it.

11 years agoRedraw bar on exposure.
Reginald Kennedy [Sat, 14 Jul 2012 21:34:25 +0000 (05:34 +0800)]
Redraw bar on exposure.

11 years agoxcb_flush before polling for events
David Hill [Sat, 14 Jul 2012 21:26:45 +0000 (17:26 -0400)]
xcb_flush before polling for events

11 years agoMake DPRINTF and DNPRINTF obey 80 col while improving readability.
Reginald Kennedy [Sat, 14 Jul 2012 20:35:15 +0000 (04:35 +0800)]
Make DPRINTF and DNPRINTF obey 80 col while improving readability.

Debug time is now seconds since start.

11 years agoadd a timestamp to debugging messages
David Hill [Sat, 14 Jul 2012 20:17:37 +0000 (16:17 -0400)]
add a timestamp to debugging messages

rename time variable to timestamp

11 years agoRemove the larger hammer in focus_win(), at least temporarily.
Reginald Kennedy [Sat, 14 Jul 2012 19:48:10 +0000 (03:48 +0800)]
Remove the larger hammer in focus_win(), at least temporarily.

Add the rest of the X event types to event_handle(), commented out.

Remove an unused global variable.

11 years agono point in setting state on an already destroyed window.
David Hill [Sat, 14 Jul 2012 15:39:05 +0000 (11:39 -0400)]
no point in setting state on an already destroyed window.
it just produces an error.

ok lordreg

11 years agoIn event_error(), show the name of the request that caused the error.
Reginald Kennedy [Sat, 14 Jul 2012 15:26:50 +0000 (23:26 +0800)]
In event_error(), show the name of the request that caused the error.

11 years agoUse xcb_event_get_error_label() instead of doing the work manually.
Reginald Kennedy [Sat, 14 Jul 2012 15:03:05 +0000 (23:03 +0800)]
Use xcb_event_get_error_label() instead of doing the work manually.

11 years agoRemove redundant geteventname() since there is xcb_event_get_label().
Reginald Kennedy [Sat, 14 Jul 2012 14:56:40 +0000 (22:56 +0800)]
Remove redundant geteventname() since there is xcb_event_get_label().

11 years agoAdd Error event type to debug output.
Reginald Kennedy [Sat, 14 Jul 2012 14:49:24 +0000 (22:49 +0800)]
Add Error event type to debug output.

Add event_type value to debug output.

11 years agoRemove redundant defines for XCB error macros.
Reginald Kennedy [Sat, 14 Jul 2012 13:52:05 +0000 (21:52 +0800)]
Remove redundant defines for XCB error macros.
The XCB_EVENT_ERROR_BAD_* macros were simply removed without new ones
being added.

11 years agoFix XCB error macros to use current naming.
Reginald Kennedy [Sat, 14 Jul 2012 10:38:22 +0000 (18:38 +0800)]
Fix XCB error macros to use current naming.

Add -lxcb-xtest to Linux Makefile.

Indentation of multi-line statements should be 4 spaces.

Remove EOL whitespace.

11 years agoinitial event error handling
David Hill [Sat, 14 Jul 2012 06:54:32 +0000 (02:54 -0400)]
initial event error handling

11 years agoremove some xcb_flush calls
David Hill [Sat, 14 Jul 2012 06:26:22 +0000 (02:26 -0400)]
remove some xcb_flush calls

11 years agoreplace XTestFakeButtonEvent with xcb
David Hill [Fri, 13 Jul 2012 23:59:26 +0000 (19:59 -0400)]
replace XTestFakeButtonEvent with xcb

11 years agoFix 'double keypress' issue.
Reginald Kennedy [Fri, 13 Jul 2012 23:49:54 +0000 (07:49 +0800)]
Fix 'double keypress' issue.

11 years agoConvert geteventname() to XCB.
Reginald Kennedy [Fri, 13 Jul 2012 23:44:45 +0000 (07:44 +0800)]
Convert geteventname() to XCB.

Add basic debug output of events in the main event loop.

11 years agoFix linux Makefile.
Reginald Kennedy [Fri, 13 Jul 2012 23:32:05 +0000 (07:32 +0800)]
Fix linux Makefile.

Some whitespace.

11 years agoGet rid of a bunch of leftover Xlib events.
David Hill [Fri, 13 Jul 2012 23:22:10 +0000 (19:22 -0400)]
Get rid of a bunch of leftover Xlib events.

11 years agoFix segfault on search_win().
Reginald Kennedy [Fri, 13 Jul 2012 22:19:31 +0000 (06:19 +0800)]
Fix segfault on search_win().
get_screen(sw->idx) was attempting to get xcb screen info from the
window index #s which would mean attempting to get a screen #2, 3, 4,
etc depending on # of windows on the screen.

Fix issue with search_win not creating windows.
The solution was to use XCB_COPY_FROM_PARENT instead of
screen->root_depth and screen->root_visual.  Turns out we dont need to
query screen information in most cases.  Seems that we still need
screen->root_depth in xcb_create_pixmap().

Clean up a few multi-line statements; openbsd styling manual dictates
that 4 spaces be used for indentation when breaking a statement to
multiple lines.

Cleanup some end of line spaces/tabs.

11 years agoinitial stab at events. ugly.
David Hill [Fri, 13 Jul 2012 20:57:32 +0000 (16:57 -0400)]
initial stab at events.  ugly.

11 years agoconvert an #if 0'd XGetWMNormalHints to XCB
David Hill [Fri, 13 Jul 2012 18:15:09 +0000 (14:15 -0400)]
convert an #if 0'd XGetWMNormalHints to XCB

11 years agoFix bar_print() so that the background of the text matches the bar color.
Reginald Kennedy [Fri, 13 Jul 2012 18:08:09 +0000 (02:08 +0800)]
Fix bar_print() so that the background of the text matches the bar color.

11 years agomissed xcb_icccm_get_wm_protocols_reply_wipe define to compile on older xcb-utils
David Hill [Fri, 13 Jul 2012 18:04:34 +0000 (14:04 -0400)]
missed xcb_icccm_get_wm_protocols_reply_wipe define to compile on older xcb-utils

11 years agoConvert XGrabKey and Keycode to XCB
David Hill [Fri, 13 Jul 2012 18:03:24 +0000 (14:03 -0400)]
Convert XGrabKey and Keycode to XCB

11 years agoFix XCB ICCCM functions to use the icccm prefix.
Reginald Kennedy [Fri, 13 Jul 2012 17:53:31 +0000 (01:53 +0800)]
Fix XCB ICCCM functions to use the icccm prefix.

Use get_atom_from_string() instead of xcb_atom_get_fast*() since it was
removed from XCB.

Fix configurerequest debug printf to use the new array.

11 years agomake syms a global so we don't allocate and free it constantly
David Hill [Fri, 13 Jul 2012 17:45:35 +0000 (13:45 -0400)]
make syms a global so we don't allocate and free it constantly

11 years agoconvert a XConfigureWindow to XCB.
David Hill [Fri, 13 Jul 2012 17:36:57 +0000 (13:36 -0400)]
convert a XConfigureWindow to XCB.

Also, only set the actual masks from the event handler.