Commit graph

518 commits

Author SHA1 Message Date
Dana Jansens
acafa38c8e Merge branch 'backport' into work
Conflicts:
	openbox/config.c
	openbox/event.c
	openbox/prop.c
	openbox/prop.h
	openbox/screen.c
	openbox/screen.h
2009-12-11 19:02:11 -05:00
Dana Jansens
7a926bb82f Find a valid image to use in the image cache. Fixes bug #1149
The larger of the width and height has to match.  If the smaller matches, then
it would have to be resized down to fit inside the area, so that does not
count.
2009-12-09 15:09:22 -05:00
Dana Jansens
437739b6a3 Fix for rendering RGBA and Image textures.
RGBA and Image textures could exceed their tarea if given an x or y offset
inside the area that is > 0.
2009-12-09 15:08:30 -05:00
Dana Jansens
4bf6b1b551 Merge branch 'backport' into work
Conflicts:
	openbox/popup.c
2009-11-21 16:56:07 -05:00
Dana Jansens
00cb161ec6 Keep things in 80 columns 2009-11-21 15:12:40 -05:00
Dana Jansens
44df758d6b Pointers are long-sized on x86_64. 2009-11-21 14:39:54 -05:00
Mikael Magnusson
fa0ae17adb Make clang happier
Add asserts to default: in switch statements
Store pointed to variables locally so it knows they don't change
Remove some dead assignments
Mark ob_exit_with_error as noreturn
Use "%s", msg instead of just msg to printf style functions
Use the c_pfocus variable
2009-11-07 17:07:05 -05:00
Mikael Magnusson
308478e4a5 Merge branch 'backport' into work
Conflicts:
	openbox/actions/desktop.c
	openbox/client.c
	openbox/event.c
	openbox/extensions.c
	openbox/popup.c
	openbox/screen.c
	parser/parse.c
2009-09-19 15:03:12 +02:00
Reilly Grant
18a2bc6da5 Fix memory corruption when y2sz is 0.
data is incremented one too many times when y2sz is zero, leading to
memory corruption.

[ also changed % 2 to & 1 -- Mikael ]
2009-07-04 15:14:48 +02:00
Mikael Magnusson
795e9ebbac Only open the default font once, then ref it.
As suggested in #3622, we don't need to open the default font for every
place that wasn't specified in the theme. Solved a bit differently than
the patch given there.
2009-07-04 14:17:13 +02:00
Mikael Magnusson
263833450d Add support for 24bit 2009-06-06 11:12:06 +02:00
Mikael Magnusson
e6fea24575 Merge branch 'backport' into work
Conflicts:
	openbox/client.c
	openbox/prop.c
	openbox/prop.h
2008-10-27 00:58:56 +01:00
Dana Jansens
4a9b25ad58 give the compiler hints about what can be kept in registers so that it can optimize the gradient code better with all the pointers going on 2008-10-27 00:27:50 +01:00
Mikael Magnusson
6799c67c07 Merge branch 'backport' into work
Conflicts:

	openbox/config.c
	openbox/keyboard.c
	openbox/moveresize.c
2008-04-23 17:07:10 +02:00
Mikael Magnusson
d47d5a2801 When icons had a very small aspect ratio, we crashed, don't. 2008-04-15 17:59:22 +02:00
Mikael Magnusson
ec328fc04f Merge branch 'backport' into work
Conflicts:

	obt/keyboard.c
	openbox/actions/cyclewindows.c
	openbox/actions/directionalwindows.c
	openbox/frame.c
	openbox/openbox.c
2008-03-08 17:43:32 +01:00
Mikael Magnusson
c716d1788b Remove double newlines. 2008-03-08 17:41:52 +01:00
Dana Jansens
18141d78da Merge branch 'backport' into work
Conflicts:

	openbox/client.c
2008-03-06 02:46:32 -05:00
Mikael Magnusson
232cbb9eb7 Don't leak auto-scaled RGBA textures. 2008-03-05 20:12:45 +01:00
Dana Jansens
ac255432b4 use g_debug for debug messages 2008-03-02 15:19:09 -05:00
Dana Jansens
da889f0365 set the right version in the new render and obt .pc files 2008-02-27 21:13:45 -05:00
Dana Jansens
deb5ef6243 obrender uses obt now, there is no obparser anymore 2008-02-27 21:09:19 -05:00
Dana Jansens
97de737767 Merge branch 'backport' into work
Conflicts:

	openbox/menuframe.c
	openbox/prompt.c
	openbox/prop.c
	openbox/prop.h
2008-02-22 12:31:26 -05:00
Dana Jansens
d9e6aa5643 Add theme options for menu line separators.
Added:
 menu.separator.color
 menu.separator.width
 menu.separator.padding.width
 menu.separator.padding.height
2008-02-22 12:13:02 -05:00
Dana Jansens
3263845459 Merge branch 'backport' into work
Conflicts:

	openbox/grab.c
	openbox/keyboard.c
2008-02-18 20:43:18 -05:00
Mikael Magnusson
71940dae6f Fix some typos in comments. 2008-02-17 19:14:59 +01:00
Dana Jansens
e1b4b9eb17 Merge branch 'backport' into work 2008-02-14 15:14:55 -05:00
Dana Jansens
3f62e77dea don't use \n at the end of g_message strings 2008-02-14 15:10:14 -05:00
Dana Jansens
66a897d9b2 don't reference free'd memory, and don't leak memory if the image cache is not saving any resized pictures 2008-02-14 15:10:14 -05:00
Dana Jansens
e7a86f5fe4 use g_message not g_print so it can go to the log 2008-02-14 15:10:14 -05:00
Dana Jansens
38c96413b3 pre-calc the sum of a picture added to an RrImage rather than calculating it every time 2008-02-14 15:10:14 -05:00
Dana Jansens
a2e3026d8a add a bunch of comments for images and image caches. and make the number of resized pictures saved in an image tunable per-icon cache. 2008-02-14 15:10:14 -05:00
Dana Jansens
35b36fc377 when resizing images, pick a source image with the same aspect ratio if possible 2008-02-14 15:10:14 -05:00
Dana Jansens
4c7cc1cfa6 Introducing the icon cache.
If an icon is the same as one in the cache, then it uses that one.
icons of different sizes (from the same client) are linked together into
one, and resizes of icons are cached and linked to all the various sizes.
so you only need one icon in memory for all your terminals now. ya!
2008-02-14 15:09:24 -05:00
Dana Jansens
512d93afcc backport the changes to render/ from the alttab branch (commit 3592046b2b) in master, as the iconcache changes depend on this
git show 3592046b -- render
2008-02-14 14:44:17 -05:00
Mikael Magnusson
e06ddf9f22 put the char member at the bottom of the struct so that it doesnt mess up alignment for the other members (assuming the compiler doesn't pad the struct appropriately anyways) 2008-02-14 14:35:28 -05:00
Dana Jansens
baf1a0919d fix min-size calculations for lineart textures 2008-02-14 14:24:37 -05:00
Dana Jansens
0da49e82ae when drawing and measuring strings in "flow" mode, don't ellipsize so that lines can wrap 2008-02-14 14:24:37 -05:00
Dana Jansens
7867ced622 allow font rendering to use multiple lines 2008-02-14 14:24:07 -05:00
Dana Jansens
c313b219a2 you can create dialog windows called "prompts" which have a message and some buttons! they don't do anything interesting yet. 2008-02-14 14:24:07 -05:00
Dana Jansens
957e07cbcc fix min-size calculations for lineart textures 2008-02-14 19:43:08 +01:00
Mikael Magnusson
c8ef10a0e1 put the char member at the bottom of the struct so that it doesnt mess up alignment for the other members (assuming the compiler doesn't pad the struct appropriately anyways) 2008-02-14 19:43:07 +01:00
Mikael Magnusson
1124d10369 Merge branch 'backport' into work
Diffing against the old work branch where most of the changes
in backport were cherry-picked from indicates this should be
alright. (0de9097017d4d1991388a35e380a57dc1135b431)
2008-02-14 19:43:02 +01:00
Dana Jansens
8f5540f76d turn the new openbox.png into the default icon.h 2008-02-14 19:40:03 +01:00
Dana Jansens
8186a81fe0 split menu overlap into x and y components 2008-02-14 19:40:02 +01:00
Dana Jansens
6bda8c2903 speed up the pyramid gradient using memcpy's. also make it not crash for 1px high textures.
here are some sample profiling results.  pyramid2 is the new code

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name

 58.78      1.54     1.54      255     6.04     6.04  gradient_pyramid1
 40.46      2.60     1.06      255     4.16     4.16  gradient_pyramid2

 54.88      2.25     2.25      504     4.46     4.46  gradient_pyramid1
 44.88      4.09     1.84      504     3.65     3.65  gradient_pyramid2
2008-02-14 19:40:02 +01:00
Dana Jansens
b92cb6a08a remove an XXX comment, the sanity check seems to have worked out fine. 2008-02-14 19:40:02 +01:00
Dana Jansens
9c72998684 a small optimization for the vertical gradients, and use the same log(n) strategy to use less memcpy's for filling out the horizontal gradients 2008-02-14 19:40:02 +01:00
Dana Jansens
3611c8210c use memcpy's to speed up vertical gradients too. split the fancy memcpy() code out into the repeat_pixel function. 2008-02-14 19:40:02 +01:00
Dana Jansens
1d00d99470 use memcpy's to make splitvertical gradient much faster - using log n memcpy's is much quicker than setting a pointer value n times
Here are some profiling results.  splitvertical1 is the original code, splitvertical2 is some slight improvements in locality for it, and splitvertical3 is the new O(log n) memcpy code

  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 49.44      0.88     0.88     1063     0.83     0.83  gradient_splitvertical1
 47.19      1.72     0.84     1063     0.79     0.79  gradient_splitvertical2
  2.81      1.77     0.05     1063     0.05     0.05  gradient_splitvertical3

i also tested this with 'time' to draw 1000 gradients, and the new code used approximately half the user time, and finished 10 seconds quicker.  so yeah, it's magical and works well.
2008-02-14 19:40:02 +01:00