"Rodolfo García Peñas (kix)" <k...@kix.es> escribió:

David Maciejak <david.macie...@gmail.com> escribió:

No problem i understand, enclosed the new patch.

Hi David,

is possible remove the extra curly brackets (in both "if"s)?:

Hi again,

Perhaps we can change this "if" from the negative way to possitive way:

+       if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
+               && !wwin->flags.skip_next_animation && wwin->icon != NULL) {

to

+       if (wwin->screen_ptr->flags.startup || wPreferences.no_animations ||
+           wwin->flags.skip_next_animation || wwin->icon == NULL) {

Then we can return earlier:

+       if (wwin->screen_ptr->flags.startup || wPreferences.no_animations ||
+           wwin->flags.skip_next_animation || wwin->icon == NULL)
+               return 0;

And then add the rest of the code with less tabs:

+       if (!wPreferences.disable_miniwindows
+           && !wwin->flags.net_handle_icon) {
+               *ix = wwin->icon_x;
+               *iy = wwin->icon_y;
+               *iw = wwin->icon->core->width;
+               *ih = wwin->icon->core->height;
+       } else {
+               if (wwin->flags.net_handle_icon) {
+                       *ix = wwin->icon_x;
+                       *iy = wwin->icon_y;
+                       *iw = wwin->icon_w;
+                       *ih = wwin->icon_h;
+               } else {
+                       *ix = 0;
+                       *iy = 0;
+                       *iw = wwin->screen_ptr->scr_width;
+                       *ih = wwin->screen_ptr->scr_height;
+               }
+       }
+       return 1;
+}

What do you think? Perhaps could be an idea to add in a different
patch, following the Carlos recommendation about git bisect,...

Cheers,
kix.
Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to