Commit Graph

281 Commits

Author SHA1 Message Date
Julien Danjou f824e383c9 [markup] Check that str is not NULL
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-11 16:23:05 +02:00
Arnaud Fontaine 162b8a690c [all] Implement an atom cache in xutil as an ordered linked-list 2008-05-11 01:10:37 +02:00
Julien Danjou 6a06e44461 [markup] Check for error before warning
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-10 10:37:12 +02:00
Julien Danjou c3e063d55e [config] Use a string array as args for uicb
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-04 12:47:16 +02:00
Julien Danjou f42f75468c [swindow] Add border manipulation function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 15:17:46 +02:00
Julien Danjou 0e1747587c [swindow] Store border width
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou c57435c96d [util] Add a_strtobool() function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou 03170abfe1 [config] Use golden ratio by default for mwfact
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou effaa99b91 [awesome] Remove useless includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou dc27cff8ab [awesome] Remove checking for value before p_delete()'ing memory
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou 5638661157 [markup] Fix memory leak
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou b142264787 [draw] Make draw_text using a const pointer to a style
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou de3fbffcf1 [xutil] Rewrite gettextprop() proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou ca4821fc9e [markup] Fix memory leak in text handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou f1ccb31bca [markup] Fix bad allocation size
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou 44890c7c33 [draw] Fix memory leak on bad markup parsing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou e2bf0042fc [xutil] Convert len to signed size
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 7a4237f34f [markup] Print the unparseable text on error
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 547d72270b [markup] Re-escape text on re-insertion 2008-05-03 12:01:05 +02:00
Julien Danjou 7b8e7bc486 [markup] Simplify
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 39364393f4 [markup] Escape text on reconstruct
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 5397e10a0f [config] Do not set background by default
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 8af24939bd [draw] Rework shadow
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 04ea13c205 [screen] Rename ScreensInfo to screen_info_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 33837d77a1 [draw] Rename DrawCtx to draw_context_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou f12f1798dd [draw] Add margin code inside markup string
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 1fc2b7997a [taglist] Stop using styles, use markup string
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 5c51759cca [draw] Make text_align part of markup format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou eab7633675 [tasklist] Remove styles; use drawtext format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 26621fd598 [emptybox] Remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 7a8e39b3e7 [markup] Add generic substitution of elements and use it for titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou a4159bbaf7 [draw] Implement a more generic markup parser
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 1e7e4663a5 [draw] Simplify <markup> adding
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 0552376dba [draw] Rebuild the pango markups while parsing ours
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 4d3d97fd4f [xutil] Use a_strndup()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 5447001254 [draw] Handle error on end of feeding into XML parser
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou a3b1b3be0b [draw] Use g_markup API to parse bg elements
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou dd9cb9810b [draw] Draw style background in draw text if no bg in markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 3965c1e1f0 [textbox] Clean things which became useless with markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou d3190fcf63 [draw] Tell pango about padding
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 1185d8b156 [draw] Add support for bg in draw_text and use ellipsize from pango
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou ce8d1ff89e [titlebar] Add string to format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou f5997892d2 [xutil] Use memcpy() instead of strncpy() for safety
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 0642e415dd [util] Fix warning for position returning
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou 834f1f2424 [common] Add support for pango markup (FS#171)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou ae1cea061c [util] Add position_to_str()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou c3642713b9 [draw] Do not declare vars in blocs 2008-05-03 12:01:03 +02:00
Arnaud Fontaine 059829e37e [xutil] check whether the error code and request are actually defined 2008-05-03 12:01:03 +02:00
Julien Danjou e272000cc6 [util] Change Fuzzy type to fuzzy_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou bd18eb2018 [util] Change Position type to position_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou df7db5e86b [util] Change Alignment type to alignment_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Arnaud Fontaine 21141c0508 [xutil] Fix missing applied mask when getting request code in xutil_get_error().
Thanks to Matthieu Pasini.
2008-05-03 12:01:03 +02:00
Julien Danjou dba40b0ca4 [xutil] Make the request earlier
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 521f7d58be [xutil] Do not use strncmp here
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 97dc830db5 [util/rules] Move Fuzzy from rules to util
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 70d26b5b36 [swindow] Free GC, make refresh inline
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 32fc1a0a78 [draw] Build with GTK by default instead of Imlib2
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou e246410126 [swindow] Rename SimpleWindow to simple_window_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou a04395ddc9 [swindow] Store gc
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 33709c62cd [xutil] Remove map_raised
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:01 +02:00
Julien Danjou 82f305b1b1 [xutil] Rework some stuff and rename xgettextprop()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:01 +02:00
Julien Danjou 328a04fb17 [draw/config] Cosmetics
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:01 +02:00
Julien Danjou a664203639 [xutil/awesome] Cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:01 +02:00
Arnaud Fontaine a541477e94 Cosmetic 2008-05-03 12:01:01 +02:00
Arnaud Fontaine d2d85941ad [common/xutil.c] Free ClassHint reply 2008-05-03 12:01:01 +02:00
Arnaud Fontaine d99586f68b [common/xutil.c] Rewrite xgettextprop properly for UTF8_STRING 2008-05-03 12:01:01 +02:00
Arnaud Fontaine 70dafae396 Move xcb_event_handler code to xutil 2008-05-03 12:01:00 +02:00
Arnaud Fontaine 71e9100927 Remove useless xutil_root_window() 2008-05-03 12:01:00 +02:00
Arnaud Fontaine da5236d57a Cosmetic 2008-05-03 12:01:00 +02:00
Arnaud Fontaine 02c99fccb8 Prefix xutil functions properly 2008-05-03 12:01:00 +02:00
Arnaud Fontaine 1eab0e44e7 * Make key symbols table, NumLock, ShiftLock and CapsLock global variables.
* Get CapsLock and ShiftLock masks properly and fix XLookupString() XCB equivalent.
2008-05-03 12:01:00 +02:00
Julien Danjou 3b295beaed Fix Xinerama detection 2008-05-03 12:01:00 +02:00
Arnaud Fontaine 64edc7c767 Allow to specify hexadecimal colors in configuration 2008-05-03 12:01:00 +02:00
Arnaud Fontaine 4a1720ddca Remove useless x_select_input() which leaded to useless requests 2008-05-03 12:01:00 +02:00
Arnaud Fontaine abcb60b9ea Fix x_get_transient_for_hint() based on XGetTransientForHint() 2008-05-03 12:01:00 +02:00
Arnaud Fontaine df3e102832 Rewrite code which query xinerama screens to fix a double free 2008-05-03 12:00:59 +02:00
Arnaud Fontaine 4bd034f768 Use unchecked instead of checked call because the error has to be in the error queue 2008-05-03 12:00:59 +02:00
Arnaud Fontaine 98091b2f1e Copy properly a window text property 2008-05-03 12:00:59 +02:00
Arnaud Fontaine dafafd077c Port Awesome to XCB 2008-05-03 12:00:59 +02:00
Julien Danjou e3496f7a25 [config] Enhance rules documentation a bit
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-30 11:11:32 +02:00
Julien Danjou 84df60e11b [draw] Check len while checking for UTF-8 chars
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-28 07:35:03 +02:00
Nikos Ntarmos ef60378754 [common] remove and getline and strndup usage
There is no getline() on FreeBSD, nor any strndup().

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-19 23:08:18 +02:00
marco candrian 1b65a8acfd [draw] line-width increasing from 1.0 to 1.25 for line-style
1.25 figured out by testing...

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-19 11:20:06 +02:00
marco candrian 37f05a8277 [draw] precise line drawing using antialiasing
Antialiasing also has the advantage, that the path get's drawn now precisely -
there have been some issues without ... depending on the line-angle, some
pixels weren't filled on some y coordinates etc.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-19 11:19:59 +02:00
marco candrian 2eb6fda36e [graph] simplify 'line' drawing; draw the border after the graph-drawing
Drawing the border after the graph-drawing, allows to draw down to the border itself
when 0 values occur.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-18 09:12:02 +02:00
marco candrian 84e8949860 [draw] draw_rectangle draws stuff inside the coordinates
E.g. to get single line (or rectangle with width = 1 etc), the path should go
through the center of the pixels (.5), when that path gets stroked finally, it
filles the pixels fully.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-17 19:10:24 +02:00
marco candrian 47495c50e3 [draw] provide the middle of a pixel to make sure it draws/fills that particular pixel/line
Fixes FS#162 now also on my PC in any way (it filled the pixels on the right
when a gradient was given, else the one on the left of x.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-17 09:46:23 +02:00
marco candrian bc7d9211ba [widgets/graph] offset fixed now.
In fact on my pc, when there is no fg_end or fg_center defined,
it draws it one pixel too much on the right.

On Gigamo's PC, that patch should work on any case.

It also 'should' work from what I guess!

For people having a problem, they could define fg_end to the same as fg.

Or when it's really serious (on not just here), that could be done inside
awesome.

(Finally somekind of little cairo bug, from my perspektive)
2008-04-14 04:21:52 +02:00
marco candrian 8277693ab4 [common/draw] no slightly diagonal gradient anymore (again)
that 'fix' didn't work out anyway properly.
Following patches should do a better job.
2008-04-14 04:18:40 +02:00
marco candrian fe07cd4f30 [draw] miter set to 10 is enough
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-13 14:18:29 +02:00
marco candrian 62ac090368 [common/draw] curious (cairo?) bug, sometimes draws the line 1 pixel to much on the right
happens only when creating a gradient, and not always, and
adding + 1 (creating a slightly diagonal gradient), seems to help a little bit).
2008-04-12 06:56:14 +00:00
marco candrian 727a42eb41 [common/draw] force the draw of the left bottom corner on rectangles
setting the miter limit to 100 works here. How to do it really properly, I won't know actually.

http://cairographics.org/manual/cairo-cairo-t.html#cairo-set-miter-limit
2008-04-12 05:41:46 +00:00
Fabienne Ducroquet b12a5235a5 [doc] Fix some typos, modify a few descriptions
Before awesome 2.3 release, I've decided to look for typos in the
awesome* manpages, here is the result. I've also modified some options'
descriptions that I didn't find very clear, I hope I have not
added/missed too many mistakes as I'm not a native English speaker...

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-11 07:34:45 +02:00
Julien Danjou 038e52c699 [draw] Allow more space for characters conversion
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-04 11:07:57 +02:00
Alex Cornejo cee3e9b60d [draw] Add option to link against GTK instead of Imlib2
I added an option to the configure script to link against gdk instead
of imlib2. Most people already have gdk installed so that way they can
use awesome without installing imlib2, and gdk's pixbuf was explicitly
designed to replace imlib2.

Also, a nice side effect is that GDK works directly with cairo
surfaces, so the process of loading images should be faster, although
since awesome does very little image loading it probably wont have a
noticable impact on performance, but it certainly won't hurt.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-03 09:16:58 +02:00
Julien Danjou ae096824d6 [draw] Better check for cairo version
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-02 17:14:09 +02:00
marco candrian 6d0040603f [config] minus values would be useful for the progressbar's gap option.
in order to get a single border for e.g. two bars. Looks more unified then.
2008-04-02 15:51:32 +02:00
Julien Danjou a79cb3f927 [config] Add a bunch of new checks in configuration file
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-02 09:17:25 +02:00
Martin Stubenschrott 8b7c8e3822 [draw] Better computation for vertical text centering
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-01 17:59:23 +02:00
Julien Danjou c4eaec5b82 [emptybox] Add alignment option
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-01 08:20:59 +02:00