Eating is the opposite of starving, right? So by eating more you have the ability to gain weight, the issues are that you need to eat quality food and you need to space it out evenly through the day, and also that you need to not add too much too soon.
200-500 calories a day additional, until you feel you again need more, is probably a good rule of thumb for 99% of people. If you added more than this then you are probably right that you are gaining more fat than muscle, if you are within this margin you may want to give it awhile longer until you can measure your progress instead of guessing.
If you greatly increase or decrease activity then of course that comes into effect as well, since that determines somewhat your total caloric burnoff through the day, and metabolism in general.