Jump to content

Photo

Example Code: Background Does Not Maximize

example code build.enlightenment.org

  • Please log in to reply
10 replies to this topic

#1 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 24 March 2015 - 03:38 PM

I'm getting some strange behavior with the Elementary example code.  The program compiles and runs, but when I click to maximize the window, the background doesn't maximize along with the rest of the window.  Here's the code:

//Compile with: gcc -o bg_example_01 bg_example_01.c -g `pkg-config --cflags --libs elementary`

#include <Elementary.h>

EAPI_MAIN int elm_main(int argc, char **argv)
{
   Evas_Object *win;
   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   win = elm_win_util_standard_add("bg-plain", "Bg Plain");
   elm_win_autodel_set(win, EINA_TRUE);
   evas_object_resize(win, 320, 320);
   evas_object_show(win);
   elm_run(); 
   return 0;
}
ELM_MAIN()

This is the most basic example, but I get the same behavior with the other examples as well.

 





A big thank you to everyone who contributes to Bodhi Linux


#2 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 24 March 2015 - 05:29 PM

What about if you use a standard window object instead of creating a basic window and manually adding a background to it? 



#3 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 24 March 2015 - 09:53 PM

That's what I'm doing - as far as I can tell.

win = elm_win_util_standard_add(const char *name, const char *title);

Evas_Object* elm_win_util_standard_add ( const char *  name,     const char *  title    )    

Adds a window object with standard setup.

Parameters: 

name - The name of the window

title - The title for the window

This creates a window like elm_win_add() but also puts in a standard background with elm_bg_add(), as well as setting the window title to title. 

The window type created is of type ELM_WIN_BASIC, with NULL as the parent widget.

Returns: The created object, or NULL on failure



#4 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 24 March 2015 - 10:57 PM

Ah - missed that. I rarely work in C, so skimming the code doesn't always translate well for me.

 

What version of Elementary are you using and what E/Elementary theme do you have in use? A standard window should have an auto resizing background by default.



#5 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 24 March 2015 - 11:16 PM

I have E19, Bodhi 3.0.0 - the default theme is 'DARK'.  I've made a few changes to font sizes, but that's about it.

The strange thing is that the background *does* resize when I just grab the corner of the window and resize it.  It's only when I click the max button that it stays the same.  Also, this only happens with the example code.  Apps like efl-volume-control or file-manager don't have this problem.



#6 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 25 March 2015 - 03:07 AM

This sounds like a bug in elementary then. Might be worth filing a ticket with the upstream folks about it.



#7 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 27 March 2015 - 02:19 AM

conr2d added a subscriber: conr2d.Via Web ยท Wed, Mar 25, 11:35 PM

Bodhi linux seems to use outdated version of libraries. (Key binding fix which I wrote long time ago still isn't applied to the latest bodhi.)
You should check bodhi's efl or elementary version. On my machine (with latest efl & elementary), the issue that you report doesn't occur.

 

 

This from the the ticket I posted on maniphest.  I'm not sure how to find the versions of efl and elementary - if I look them up in synaptic they both have a version number of 20150220-1.  My version of bodhi is 3.0.0 with enlightenment 0.19.3.



#8 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 30 March 2015 - 07:18 PM

We haven't updated Elementary because it has a wicked bug that causes segfaults when changing E themes that has yet to be resolved.

 

You can get much newer EFL/Elm versions (with this bug alongside other fixes) by adding the gitcha branch -> http://forums.bodhil...-gitcha-branch/



#9 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 31 March 2015 - 02:44 PM

Thanks Jeff - That sounds scary, so I'll hold off for now, but thank you for the suggestion.  I'm going to let the elementary guys look at it for a bit longer to see if there is another plan of attack.  Someone on the thread suggested I try a different WM so I was also thinking of trying another bodhi or enlightenment installation on a different machine to see if it makes a difference.

 

I know this is not a mission-critical issue, because my system is working great on bodhi, but I really think the pathway for new developers to get started on enlightenment/efl should be well documented and working.  I'll be happy to contribute as much as I can. 



#10 llnathanll

llnathanll

    Member

  • Members
  • 14 posts

Posted 07 April 2015 - 03:21 AM

I tried running the same examples on a virtual machine with a fresh installation of bodhi 3.0.0 - no issues.  Has my current system somehow become corrupted?  At this point I'm thinking I'll re-install bodhi.  Is it best to wipe it clean and start fresh?



#11 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 07 April 2015 - 11:45 AM

I tried running the same examples on a virtual machine with a fresh installation of bodhi 3.0.0 - no issues.  Has my current system somehow become corrupted?  At this point I'm thinking I'll re-install bodhi.  Is it best to wipe it clean and start fresh?

 

If you are thinking about wiping out your system anyways - take a second and upgrade to the packages in the gitcha branch. Software often has regressions (and E/EFL release tars are notoriously bad) so there is a very real chance that the most update to date version of elementary in the Bodhi main repo right now has a bug in it.

Really wish someone would fix the theme change segfault issue so we could upgrade elementary versions in the main repo






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users