Some interesting information:
III. Discretionary Authority of the Prime Minister
15. Foreign Heads of State or Heads of Government - Half-masting in Canada
Upon the death of a current foreign head of state or a foreign head of government, and after consideration of his/her stature and the relation of that country with Canada, the Prime Minister may approve the Half-masting of the Flag on the Peace Tower on the advice of Foreign Affairs, Trade and Development Canada and Canadian Heritage, and the recommendation of the Clerk of the Privy Council.
16. Exceptional Circumstances
In exceptional circumstances, and on the advice of the Department of Canadian Heritage and the recommendation of the Clerk of the Privy Council, the Prime Minister may approve the Half-masting of the Flag on the Peace Tower, and/or on all or some federal buildings and establishments in Canada or abroad, that is not provided for in the Rules.
19. Legal Holidays
If the Flag is Half-masted anywhere in Canada or abroad in accordance with the Rules, it must nonetheless be flown at full-mast on the following legal holidays created under the Holidays Act (R.S.C. c. H-5): Victoria Day and Canada Day.
20. Visiting Foreign Head of State or Head of Government
If the Flag is Half-masted on the Peace Tower in accordance with the Rules, it must nonetheless be raised to full-mast while a foreign head of state or foreign head of government is visiting Parliament.
21. Exceptions to Sections 19 and 20
Sections 19 and 20 do not apply if the Flag is Half-masted for the death of the Sovereign, but the Flag is flown at full-mast on the day on which the accession of the new monarch is proclaimed. Sections 19 and 20 also do not apply if the Flag is Half-masted for the death of the current Governor-General or the current Prime Minister.
Source: Rules for half-masting the National Flag of Canada - Canada.ca
I'm pretty sure that it was down on Canada Day, which apparently it was not supposed to be.