diff options
author | sabetts <sabetts> | 2006-03-16 01:00:43 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2006-03-16 01:00:43 +0000 |
commit | 73a3c5a465dbe5df9bed5f163d2c105065b861f2 (patch) | |
tree | 375b085a935bc6d6d467e0d4f2e48a2b6807fc1a /src/frame.c | |
parent | 9cb1a3d51b8cba35ef443c64b5b1d99fa8d33ae6 (diff) | |
download | ratpoison-73a3c5a465dbe5df9bed5f163d2c105065b861f2.zip |
* src/window.c (_XOPEN_SOURCE): new define
* src/screen.c (is_a_root_window): w is unsigned int
(init_screen): typecast _net_wm_pid as unsigned char*.
* src/main.c (read_rc_file): linesize is size_t
* src/frame.c (frame_read): use a temp var when reading the
:dedicated value.
* src/bar.c (max_line_length): i and start are size_t
(draw_string): i is size_t
(get_mark_box): mark_start and mark_end are size_t
* src/actions.c (find_keybinding): state is unsigned int
(remove_keybinding): likewise
(frame_selector): n is unsigned int
(frame_selector_match): i is size_t. typecast comparison as size_t.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/frame.c b/src/frame.c index d101588..9abd0d9 100644 --- a/src/frame.c +++ b/src/frame.c @@ -233,8 +233,16 @@ frame_read (char *str) read_slot(w); else if (!strcmp(tmp, ":last-access")) read_slot(f->last_access); - else if (!strcmp(tmp, ":dedicated")) - read_slot(f->dedicated); + else if (!strcmp(tmp, ":dedicated")) { + /* f->dedicated is unsigned, so read into local variable. */ + long dedicated; + + read_slot(dedicated); + if (dedicated <= 0) + f->dedicated = 0; + else if (f->dedicated >= 1) + f->dedicated = 1; + } else if (!strcmp(tmp, ")")) break; else @@ -260,10 +268,6 @@ frame_read (char *str) f->height = defaults.window_border_width*2 + 1; if (f->last_access < 0) f->last_access = 0; - if (f->dedicated < 0) - f->dedicated = 0; - else if (f->dedicated > 1) - f->dedicated = 1; /* Find the window with the X11 window ID. */ win = find_window_in_list (w, &rp_mapped_window); |